From d27a08bc91bcbc98513e5a4741fc91016665a198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 2 Aug 2021 07:23:00 +0200 Subject: [PATCH] crypto: Fix a comment in the attachment encryption logic --- matrix_sdk_crypto/src/file_encryption/attachments.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix_sdk_crypto/src/file_encryption/attachments.rs b/matrix_sdk_crypto/src/file_encryption/attachments.rs index cdf82ab2..ed794321 100644 --- a/matrix_sdk_crypto/src/file_encryption/attachments.rs +++ b/matrix_sdk_crypto/src/file_encryption/attachments.rs @@ -215,8 +215,8 @@ impl<'a, R: Read + 'a> AttachmentEncryptor<'a, R> { let mut iv = Zeroizing::new([0u8; IV_SIZE]); getrandom(&mut *key).expect("Can't generate randomness"); - // Only populate the first 8 bits with randomness, the rest is 0 - // initialized. + // Only populate the first 8 bytes with randomness, the rest is 0 + // initialized for the counter. getrandom(&mut iv[0..8]).expect("Can't generate randomness"); let web_key = JsonWebKey::from(JsonWebKeyInit {