예제 #1
0
 @Test
 public void testKeccak224() {
   MAC hmac = HMAC.keccak224(ascii(EMPTY_STRING));
   assertArrayEquals(
       hex("5b71601b23a34517acd63847e99e461baf705e71884b986b4c" + "f64e19"),
       hmac.digest(ascii(EMPTY_STRING)));
   hmac = HMAC.keccak224(ascii("key"));
   assertArrayEquals(
       hex("763e70a1ec866fbc1c6e6c398cd6e2383e2ad3aecbb3d6150f" + "1e56fd"),
       hmac.digest(ascii(PANGRAM)));
 }