PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
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
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
bufACrypter is Buffer = "Mon message à crypter"
 
bufCléPrivée is Buffer
bufCléPublique is Buffer
 
// Génération de clés privées, publiques
(bufCléPrivée,bufCléPublique) = EncryptGenerateRSAKey()
 
// Sauvegarde dans des fichiers
fSaveText("FicCléPrivée.pem", bufCléPrivée)
fSaveText("FicCléPublique.pem", bufCléPublique)
 
// Cryptage
bufMessageCrypté is Buffer = EncryptAsymmetric(bufACrypter, ...
"FicCléPublique.pem", "", cryptPaddingOAEP)
 
// Décryptage
bufMessageDécrypté is Buffer = DecryptAsymmetric(bufMessageCrypté, ...
"FicCléPrivée.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.
Related Examples:
Asymmetric encryption Unit examples (WINDEV): Asymmetric encryption
[ + ] Using the asymmetric encryption functions (EncryptAsymmetric, DecryptAsymmetric)
Business / UI classification: Business Logic
Component: wd270com.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment