From: Ian Jackson Date: Sun, 1 Aug 2021 00:25:33 +0000 (+0100) Subject: own hmac, tests, pass, note origin X-Git-Tag: hippotat/1.0.0~405 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=cc75891dbcb7ba1489c3550a7ed6fe5c2c308424;p=hippotat.git own hmac, tests, pass, note origin Copyrightwise this is fine because IETF licences code in RFCs appropriately. Signed-off-by: Ian Jackson --- 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)