crypto: Fix a comment in the attachment encryption logic
This commit is contained in:
parent
5192feb836
commit
d27a08bc91
1 changed files with 2 additions and 2 deletions
|
@ -215,8 +215,8 @@ impl<'a, R: Read + 'a> AttachmentEncryptor<'a, R> {
|
||||||
let mut iv = Zeroizing::new([0u8; IV_SIZE]);
|
let mut iv = Zeroizing::new([0u8; IV_SIZE]);
|
||||||
|
|
||||||
getrandom(&mut *key).expect("Can't generate randomness");
|
getrandom(&mut *key).expect("Can't generate randomness");
|
||||||
// Only populate the first 8 bits with randomness, the rest is 0
|
// Only populate the first 8 bytes with randomness, the rest is 0
|
||||||
// initialized.
|
// initialized for the counter.
|
||||||
getrandom(&mut iv[0..8]).expect("Can't generate randomness");
|
getrandom(&mut iv[0..8]).expect("Can't generate randomness");
|
||||||
|
|
||||||
let web_key = JsonWebKey::from(JsonWebKeyInit {
|
let web_key = JsonWebKey::from(JsonWebKeyInit {
|
||||||
|
|
Loading…
Reference in a new issue