|
THotPDF.CryptKeyLength
|
Viršus Ankstesnis Kitas |
|
Determines PDF file encryption method.
type THPDFKeyType = ( k40, k128, aes128, aes256 );
Delphi syntax: property CryptKeyLength: THPDFKeyType;
C++ syntax: __property THPDFKeyType CryptKeyLength;
Aprašas Naudokite CryptKeyLength, kad pasirinktumėte standartinio saugumo tvarkyklės reviziją ir šifrą, naudojamą įjungus ActivateProtection
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) Sertifikatų pagrindu vykdomam šifravimui (vienas dokumentas, keli gavėjai) kvieskite EnablePubKeyEncryption(seed, KeyType, EncryptMetadata) vietoj UserPassword / OwnerPassword nustatymo. Tos pačios CryptKeyLength reikšmės taikomos simetriniam šifrui (k40 -> RC4-40 / V=1 + s4 SubFilter, k128 -> RC4-128 / V=2 + s5, aes128 -> AES-128 / V=4 + s5). Kūrėjas kiekvienam gavėjui turi sukurti po vieną PKCS#7 envelopedData blobą (Windows CryptoAPI, OpenSSL arba pycryptodome) ir kiekvieną blobą pridėti per AddPubKeyRecipient; failo šifravimo raktas išvedamas pagal 9 algoritmą (seed SHA-1 sujungtas su envelope dvejetainiais duomenimis). Prieinamas nuo HotPDF v2.33.0
Code Example
See also: ActivateProtection, OwnerPassword, ProtectOptions, UserPassword
|