From 6d808aef548ab629c63f652ae5535131cdadc338 Mon Sep 17 00:00:00 2001 From: 0xalivecow Date: Tue, 29 Oct 2024 20:22:02 +0100 Subject: [PATCH 1/2] chore: debug official ci --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 5816ecb..59e561b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,8 @@ use std::{ fs, }; +// TESTING + use anyhow::Result; fn main() -> Result<()> { -- 2.49.1 From 1dfed264e9436367fb4a375cd541c11d41f9b82b Mon Sep 17 00:00:00 2001 From: 0xalivecow Date: Sun, 3 Nov 2024 20:15:55 +0100 Subject: [PATCH 2/2] fix: add padding to empty ad case --- src/utils/ciphers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/ciphers.rs b/src/utils/ciphers.rs index 7fb6e63..56b4ead 100644 --- a/src/utils/ciphers.rs +++ b/src/utils/ciphers.rs @@ -334,7 +334,7 @@ pub fn ghash( eprintln!("{:?}", (ad.len() % 16) as u8); eprintln!("{:001X?}", ad); - if ad.len() % 16 != 0 { + if ad.len() % 16 != 0 || ad.is_empty() { ad.append(vec![0u8; 16 - (ad.len() % 16)].as_mut()); } -- 2.49.1