public function encryptPrivateKey($privateKey, $password)
    {
        try {
            return CryptoVirgilKeyPair::encryptPrivateKey($privateKey, $password);
        } catch (Exception $exception) {
            throw new PrivateKeyEncryptionException($exception->getMessage(), $exception->getCode());
        }
    }
public function encryptPrivateKey($privateKey, $password)
    {
        try {
            return CryptoVirgilKeyPair::encryptPrivateKey($privateKey, $password);
        } catch (Exception $exception) {
            throw new PrivateKeyEncryptionException($exception->getMessage(), $exception->getCode());
        }
    }
public function encryptPrivateKey ( $ privateKey , $ password ) { try { return CryptoVirgilKeyPair :: encryptPrivateKey ( $ privateKey , $ password ) ; } catch ( Exception $ exception ) { throw new PrivateKeyEncryptionException ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) ) ; } }
Encrypts private key with a password.

@param string $privateKey
@param string $password

@return string

@throws PrivateKeyEncryptionException
Encrypts private key with a password .