PDFSM4DecryptStringBuffer

密碼編譯

描述

以原始指標與位元組數提供的帶 IV 前綴 SM4-CBC 資料區進行解密

語法

Delphi

Function PDFSM4DecryptStringBuffer(Const Key: AnsiString;
  Ciphertext: Pointer; CiphertextLength: Integer): AnsiString;

參數

Key正好 16 位元組
Ciphertext指向帶 IV 前綴資料區的指標;不得為 nil
CiphertextLength至少 32 且為 16 的倍數

傳回值

去除填補後的明文,緩衝區畸形或填補檢查失敗時為空字串

備註

從緩衝區複製 CiphertextLength 位元組後等同於 PDFSM4DecryptString

記憶體映射或 socket 緩衝區請用此形式,避免中間字串複製

另請參閱

PDFSM4DecryptString, PDFSM4EncryptString, SM4DecryptCBCPKCS7