|
|
|
|
EncryptGenerateRSAKey (Función) Genera una pareja clave privada/clave pública RSA. 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)
Sintaxis
(<Private key>, <Public key>) = EncryptGenerateRSAKey([<Size>])
<Private key>: Buffer Clave privada en formato PEM. <Public key>: Buffer Clave pública en formato PEM. <Size>: Entero opcional Número de bits de la clave. De forma predeterminada, este parámetro corresponde a 4096. Clasificación Lógica de negocio / UI: Lógica de negocio
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|