pub struct EncryptParams {
pub file_key: [u8; 32],
pub encrypt_dict: ObjId,
pub encrypt_dict_value: Object,
pub file_id: [Vec<u8>; 2],
pub encrypt_metadata: bool,
}Expand description
The values a full encrypting rewrite needs beyond the ordinary
save_full inputs: the file key, the object the /Encrypt dictionary
occupies, that dictionary’s value, and the two-element /ID.
At /V 5 /ID plays no part in key derivation (unlike /R 4), so a
freshly generated pair is written verbatim; it exists because §7.5.5 makes
/ID mandatory whenever /Encrypt is present.
Fields§
§file_key: [u8; 32]The 32-byte file encryption key (never serialised; drives the encoder).
encrypt_dict: ObjIdThe object number and generation the /Encrypt dictionary is written
at — its own strings/streams are exempt from encryption (§7.6).
encrypt_dict_value: ObjectThe /Encrypt dictionary as a value ready to serialise (/V 5 /R 6 /CFM AESV3, with the byte-string /O//U//OE//UE//Perms).
file_id: [Vec<u8>; 2]The /ID array’s two byte strings.
encrypt_metadata: bool/EncryptMetadata — when false, /Metadata streams are left in clear.