PDFSM4EncryptedLength

Criptografía

Descripción

Calcula la longitud exacta de salida de PDFSM4EncryptString para un plaintext del tamaño dado

Sintaxis

Delphi

Function PDFSM4EncryptedLength(PlaintextLength: Int64): Int64;

Parámetros

PlaintextLengthTamaño del plaintext en bytes

Valores devueltos

longitud16 bytes de IV más el cuerpo con padding PKCS#7: 16 + ((Length div 16) + 1) * 16
-1PlaintextLength es negativo

Observaciones

Úsalo para dimensionar buffers antes de llamar a PDFSM4EncryptString o PDFSM4EncryptToStream

Véase también

PDFSM4EncryptString, PDFSM4EncryptToStream, SM4PadPKCS7