PDFSM4EncryptedLength
Cryptography
Description
Computes the exact output length of PDFSM4EncryptString for a plaintext of the given size
Syntax
Delphi
Function PDFSM4EncryptedLength(PlaintextLength: Int64): Int64;Parameters
| PlaintextLength | Plaintext size in bytes |
|---|
Return values
| length | 16 bytes of IV plus the PKCS#7-padded body: 16 + ((Length div 16) + 1) * 16 |
|---|---|
| -1 | PlaintextLength is negative |
Remarks
Use this to size buffers before calling PDFSM4EncryptString or PDFSM4EncryptToStream