PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Decrypts a buffer with a private/public key algorithm with RSA encryption. This message has been previously encrypted with EncryptAsymmetric.
Versions 25 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
New in version 25
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
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 = EncryptAsymmetric(bufToEncrypt, sPublicKeyFile, ...
sPublicKeyPassword, cryptPaddingPKCS1)

// Decryption  
// -------------
bufEncryptedMessage is Buffer
bufDecryptedMessage is Buffer
sPrivateKeyFile is string = fExeDir() + "\PrivateKey.pem"
sPrivateKeyPassword is string = "xxx"

bufDecryptedMessage = DecryptAsymmetric(bufEncryptedMessage, sPrivateKeyFile, ...
sPrivateKeyPassword, cryptPaddingPKCS1)
Syntax
<Result> = DecryptAsymmetric(<Content to decrypt> , <Private key file> [, <Password> [, <Padding>]])
<Result>: Buffer
Result of decryption for the specified message.
<Content to decrypt>: Buffer
Buffer to decrypt.
<Private key file>: Character string (with quotes)
Name and path of the file corresponding to the RSA private key to use for decryption. pem and p12 key formats are supported.
<Password>: Optional character string (with quotes)
Key file password (if required).
<Padding>: Optional Integer constant
Padding mode for encrypted data (used during encryption) to be compatible with the size required by block encryption algorithms:
cryptPaddingPKCS1
(Default value)
Padding according to the PKCS 1 algorithm (Public Key Cryptographic Standards).
cryptPaddingOAEPPadding according to the OAEP algorithm (Optimal Asymmetric Encryption Padding).
Component : wd250com.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment