Skip to content

Commit

Permalink
Link RFC 3211
Browse files Browse the repository at this point in the history
Co-authored-by: Arthur Gautier <[email protected]>
  • Loading branch information
bkstein and baloo authored Dec 4, 2023
1 parent d819cd4 commit a3a6708
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cms/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -764,10 +764,12 @@ where
})
}

/// Wrap the content-encryption key according to RFC 3211, §2.3.1:
/// Wrap the content-encryption key according to [RFC 3211, §2.3.1]:
/// ....
/// The formatted CEK block then looks as follows:
/// CEK byte count || check value || CEK || padding (if required)
///
/// [RFC 3211, §2.3.1]: https://www.rfc-editor.org/rfc/rfc3211#section-2.3.1
fn wrap_content_encryption_key(&mut self, content_encryption_key: &[u8]) -> Result<Vec<u8>> {
let content_encryption_key_length = content_encryption_key.len();
let wrapped_key_length_wo_padding = 1 + 3 + content_encryption_key_length;
Expand Down

0 comments on commit a3a6708

Please sign in to comment.