PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
Generates an RSA private/public key pair.
Versions 26 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 26
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
bufToEncrypt is Buffer = "My message to encrypt"
 
bufPrivateKey is Buffer
bufPublicKey is Buffer
 
// Generate private, public keys
(bufPrivateKey,bufPublicKey) = EncryptGenerateRSAKey()
 
// Save in files
fSaveText("FilePrivateKey.pem", bufPrivateKey)
fSaveText("FilePublicKey.pem", bufPublicKey)
 
// Encryption
bufEncryptedMessage is Buffer = EncryptAsymmetric(butToEncrypt, ...
"FilePublicKey.pem", "", cryptPaddingOAEP)
 
// Decryption
bufDecryptedMessage is Buffer = DecryptAsymmetric(bufEncryptedMessage, ...
"FilePrivateKey.pem", "", cryptPaddingOAEP)
Syntax
(<Private key>, <Public key>) = EncryptGenerateRSAKey([<Size>])
<Private key>: Buffer
PEM private key.
<Public key>: Buffer
PEM public key.
<Size>: Optional integer
Number of bits in the key. This parameters corresponds to 4096. by default.
Business / UI classification: Business Logic
Component: wd260com.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment