|
|
|
|
DecryptAsymmetricEnveloped (Función) // Encrypting a character string //--------------------------------------- bufToEncrypt is Buffer = "Message to encrypt" bufEncryptedMessage is Buffer sPublicKeyFile is string = fExeDir() + "\PublicKey.pem" sPublicKeyPassword is string = "xxx" bufEncryptedMessage = EncryptAsymmetricEnveloped(bufToEncrypt, sPublicKeyFile, ... sPublicKeyPassword) // Decryption // ------------- bufEncryptedMessage is Buffer bufDecryptedMessage is Buffer sPrivateKeyFile is string = fExeDir() + "\PrivateKey.pem" sPrivateKeyPassword is string = "xxx" bufDecryptedMessage = DecryptAsymmetricEnveloped(bufEncryptedMessage, sPrivateKeyFile, ... sPrivateKeyPassword) bufToEncrypt is Buffer = "Message to encrypt" bufEncryptedMessage is Buffer bufPublicKey is Buffer bufPrivateKey is Buffer (bufPrivateKey, bufPublicKey) = EncryptGenerateRSAKey(1024) // Encrypting a character string //--------------------------------------- bufEncryptedMessage = EncryptAsymmetricEnveloped(bufToEncrypt, bufPublicKey) // Decryption // ------------- bufEncryptedMessage is Buffer bufDecryptedMessage is Buffer bufDecryptedMessage = DecryptAsymmetricEnveloped(bufEncryptedMessage, bufPrivateKey)
Sintaxis
<Result> = DecryptAsymmetricEnveloped(<Content to decrypt> , <Private key file> [, <Password>])
<Result>: Buffer Contenido desencriptado. <Content to decrypt>: Buffer Mensaje a desencriptar correspondiente al contenido de EncryptAsymmetricEnvelopped. <Private key file>: Cadena de caracteres o memoria intermedia - Nombre y ruta del archivo que corresponde a la clave privada RSA que se utilizará para descifrar los datos. Los formatos de clave pem, y p12 están soportados.
- Buffer que contiene la clave privada RSA que se utilizará para descifrar los datos.
<Password>: Cadena de caracteres opcional Contraseña del archivo de claves (si es necesario).
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|