chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c9be85
)
own hmac, tests, pass, note origin
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 1 Aug 2021 00:25:33 +0000
(
01:25
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 1 Aug 2021 00:25:33 +0000
(
01:25
+0100)
Copyrightwise this is fine because IETF licences code in RFCs
appropriately.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/utils.rs
patch
|
blob
|
history
diff --git
a/src/utils.rs
b/src/utils.rs
index 868dd1108cb26f7d204609ba76ba2619390d3ba8..8a8d0345440d28163bd4d59bcfcb6ca9dd8df666 100644
(file)
--- 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)