ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Warning
From version 28, DecryptAsymmetricEnvelopped is kept for backward compatibility. This function is replaced by DecryptAsymmetricEnveloped.
Performs the asymmetric encryption of an envelope that has been encrypted with EncryptAsymmetricEnveloped.
Example
// Encrypting a character string
//---------------------------------------
bufToEncrypt is Buffer = "Message to encrypt"
bufEncryptedMessage is Buffer
sPublicKeyFile is string = fExeDir() + "\PublicKey.pem"
sPublicKeyPassword is string = "xxx"
 
bufEncryptedMessage = EncryptAsymmetricEnveloped(bufToEncrypt, sPublicKeyFile, ...
sPublicKeyPassword)
 
// Decryption  
// -------------
bufEncryptedMessage is Buffer
bufDecryptedMessage is Buffer
sPrivateKeyFile is string = fExeDir() + "\PrivateKey.pem"
sPrivateKeyPassword is string = "xxx"
 
bufDecryptedMessage = DecryptAsymmetricEnveloped(bufEncryptedMessage, sPrivateKeyFile, ...
sPrivateKeyPassword)
New in version 28
bufToEncrypt is Buffer = "Message to encrypt"
bufEncryptedMessage is Buffer
bufPublicKey is Buffer
bufPrivateKey is Buffer
(bufPrivateKey, bufPublicKey) = EncryptGenerateRSAKey(1024)
// Encrypting a character string
//---------------------------------------
bufEncryptedMessage = EncryptAsymmetricEnveloped(bufToEncrypt, bufPublicKey)
 
// Decryption  
// -------------
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.
  • New in version 28
    Buffer containing the RSA private key to be used to decrypt the data.
<Password>: Optional character string
Key file password (if required).
Component: wd280com.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment