|
THotPDF.CryptKeyLength
|
先頭 前へ 次へ |
|
Determines PDF file encryption method.
type THPDFKeyType = ( k40, k128, aes128, aes256 );
Delphi syntax: property CryptKeyLength: THPDFKeyType;
C++ syntax: __property THPDFKeyType CryptKeyLength;
説明 ActivateProtection が有効なときに使用する standard security handler の revision と cipher を選択するには CryptKeyLength を使用します
Value Meaning k40 Standard security handler V=1, R=2, RC4 with a 40-bit key (PDF 1.1+). k128 Standard security handler V=2, R=3, RC4 with a 128-bit key (PDF 1.4+). aes128 Standard security handler V=4, R=4 with crypt filter aes256 Standard security handler V=5 with crypt filter
Public-Key Security Handler (PDF 1.7 7.6.5) 証明書ベースの暗号化 (1 つのドキュメント、複数の受信者) では、UserPassword / OwnerPassword を設定する代わりに EnablePubKeyEncryption(seed, KeyType, EncryptMetadata) を呼び出します。同じ CryptKeyLength 値が対称 cipher に適用されます (k40 -> RC4-40 / V=1 + s4 SubFilter、k128 -> RC4-128 / V=2 + s5、aes128 -> AES-128 / V=4 + s5)。呼び出し元は受信者ごとに PKCS#7 envelopedData blob を 1 つ作成し (Windows CryptoAPI、OpenSSL、または pycryptodome)、各 blob を AddPubKeyRecipient で追加する必要があります。file encryption key は algorithm 9 (seed と envelope binaries の連結に対する SHA-1) で導出されます。HotPDF v2.33.0 以降で利用できます
Code Example
関連項目: ActivateProtection, OwnerPassword, ProtectOptions, UserPassword
|