From cc75891dbcb7ba1489c3550a7ed6fe5c2c308424 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 1 Aug 2021 01:25:33 +0100 Subject: [PATCH] own hmac, tests, pass, note origin Copyrightwise this is fine because IETF licences code in RFCs appropriately. Signed-off-by: Ian Jackson --- src/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils.rs b/src/utils.rs index 868dd11..8a8d034 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -51,6 +51,7 @@ pub fn token_hmac(key: &[u8], message: &[u8]) -> [u8; HMAC_L] { #[test] fn hmac_test_vectors(){ + // C&P from RFC 4231 let vectors = r#" Key = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b 0b0b0b0b (20 bytes) -- 2.30.2