|
|
|
|
|
DecryptAsymmetricEnveloped (Function) In french: DécrypteAsymétriqueEnveloppé
Warning
From version 28, DecryptAsymmetricEnvelopped is kept for backward compatibility. This function has been replaced with DecryptAsymmetricEnveloped.
bufToEncrypt is Buffer = "Message to encrypt"
bufEncryptedMessage is Buffer
sPublicKeyFile is string = fExeDir() + "\PublicKey.pem"
sPublicKeyPassword is string = "xxx"
bufEncryptedMessage = EncryptAsymmetricEnveloped(bufToEncrypt, sPublicKeyFile, sPublicKeyPassword)
bufEncryptedMessage is Buffer
bufDecryptedMessage is Buffer
sPrivateKeyFile is string = fExeDir() + "\PrivateKey.pem"
sPrivateKeyPassword is string = "xxx"
bufDecryptedMessage = DecryptAsymmetricEnveloped(bufEncryptedMessage, sPrivateKeyFile, sPrivateKeyPassword)
bufToEncrypt is Buffer = "Message to encrypt"
bufEncryptedMessage is Buffer
bufPublicKey is Buffer
bufPrivateKey is Buffer
(bufPrivateKey, bufPublicKey) = EncryptGenerateRSAKey(1024)
bufEncryptedMessage = EncryptAsymmetricEnveloped(bufToEncrypt, bufPublicKey)
bufEncryptedMessage is Buffer
bufDecryptedMessage is Buffer
bufDecryptedMessage = DecryptAsymmetricEnveloped(bufEncryptedMessage, bufPrivateKey)
Syntax
<Result> = DecryptAsymmetricEnveloped(<Content to decrypt> , <Private key file> [, <Password>])
<Result>: Buffer Decrypted content. <Content to decrypt>: Buffer Message to decrypt corresponding to the content of EncryptAsymmetricEnveloped. <Private key file>: Character string or Buffer - Name and path of the file corresponding to the RSA private key to be used to decrypt the data. pem and p12 key formats are supported.
- Buffer containing the RSA private key to be used to decrypt the data.
<Password>: Optional string or Secret string Key file password (if required).
New in version 2025Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string". To learn more about secret strings and how to use the vault, see Secret string vault.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|