AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de cifrado/compresión
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Realiza el cifrado asimétrico de un sobre que ha sido cifrado con EncryptAsymmetricEnvelopped.
Ejemplo
// 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).
Componente: wd290com.dll
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/11/2023

Señalar un error o enviar una sugerencia | Ayuda local