|
|
|
|
|
EncryptGenerateRSAKey (Function) In french: CrypteGénèreCléRSA Generates an RSA private/public key pair. 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.
Related Examples:
|
Unit examples (WINDEV): Asymmetric encryption
[ + ] Using the asymmetric encryption functions (EncryptAsymmetric, DecryptAsymmetric)
|
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|