PDFSM4EncryptedLength

Criptografía

Descripción

Calcula la longitud exacta de salida de PDFSM4EncryptString para un texto en claro del tamaño dado

Sintaxis

Delphi

Function PDFSM4EncryptedLength(PlaintextLength: Int64): Int64;

Parámetros

PlaintextLengthTamaño del texto en claro en bytes

Valores devueltos

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

Observaciones

Úsalo para dimensionar búferes antes de llamar a PDFSM4EncryptString o PDFSM4EncryptToStream

Véase también

PDFSM4EncryptString, PDFSM4EncryptToStream, SM4PadPKCS7