PDFDérivation
Vue de l’ensemble
‘PDFKeyDerivation’ est une classe dans Aspose.PDF FOSS pour Java.
Les algorithmes de dérivation clés de la cryptographie PDF.
Cette classe fournit 11 méthodes pour travailler avec les objets de PDFKeyDerivation dans les programmes Java. Les méthodologies disponibles comprennent: computeEncryptionKayR2R4, ComputenEnCryptionsKyR5Owner , compteEcryptEncréditationKoyR6Uwler ; concriptionEncoptionKeir6Ovner‘ ; 'comptenHashR5, kompteHasR6, generateO_R3R4, genateU_r2, génate U_3 R4', padPassword` Tous les membres publics sont accessibles à toute application Java après l’installation du package Asp.FOSS pour le programme Java : ProPADINGD.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
PADDING | byte[] | Read | The 32-byte padding string from Algorithm 2 step (a). |
méthodes
| Signature | Description |
|---|---|
computeEncryptionKeyR2R4(password: byte[], encDict: PDFEncryptionDict, documentId: byte[]) → byte[] | Algorithm 2: Compute encryption key for R2-R4. |
computeEncryptionKeyR6User(password: byte[], encDict: PDFEncryptionDict) → byte[] | Compute encryption key for R=5/R=6 (AES-256). |
computeEncryptionKeyR6Owner(password: byte[], encDict: PDFEncryptionDict) → byte[] | Compute encryption key for R=6 via owner password. |
computeHashR5(password: byte[], salt: byte[], userKey: byte[]) → byte[] | R=5 (Adobe Extension Level 3) hash: a single SHA-256 of |
| {@code password + salt [+ userKey]}, with NO Algorithm 2.B iteration. | |
computeEncryptionKeyR5User(password: byte[], encDict: PDFEncryptionDict) → byte[] | Compute the file encryption key for R=5 via the user password |
| (Adobe Extension Level 3 — single SHA-256, no iteration). | |
computeEncryptionKeyR5Owner(password: byte[], encDict: PDFEncryptionDict) → byte[] | Compute the file encryption key for R=5 via the owner password |
| (Adobe Extension Level 3 — single SHA-256, no iteration). | |
generateO_R2R4(ownerPassword: byte[], userPassword: byte[], keyLenBytes: int, R: int) → byte[] | Algorithm 3 (ISO 32000-1:2008, §7.6.3.4): computes the /O (owner) hash. |
generateU_R2(encryptionKey: byte[]) → byte[] | Algorithm 4 (ISO 32000-1:2008, §7.6.3.4): computes the /U hash for R=2. |
generateU_R3R4(encryptionKey: byte[], documentId: byte[]) → byte[] | Algorithm 5 (ISO 32000-1:2008, §7.6.3.4): computes the /U hash for R=3/4. |
padPassword(password: byte[]) → byte[] | Pads or truncates a password to exactly 32 bytes. |
computeHashR6(password: byte[], salt: byte[], userKey: byte[]) → byte[] | Computes the R=6 validation or key-derivation hash (ISO 32000-2, Algorithm 2.B). |
Voir aussi
- Aspose.PDF pour Java — API d’entreprise