Definition checkHex password text digest :=
  bytelist_eq (HMACHex text password) (hexstring_to_bytelist digest) = true.

(* Specifications: *)
Lemma RFC4231_Section4_2_hex: (*called PRF-1 in RFC4868*) checkHex "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b" "4869205468657265" "b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7".
Lemma RFC4231_Section4_3_hex: (*called PRF-2 in RFC4868*) checkHex "4a656665" "7768617420646f2079612077616e7420666f72206e6f7468696e673f" "5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843".
Lemma RFC4231_Section4_4_hex: (*called PRF-3 in RFC4868*) checkHex "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" "773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe".
Lemma RFC4231_Section4_5_hex: (*called PRF-4 in RFC4868*) checkHex "0102030405060708090a0b0c0d0e0f10111213141516171819" "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd" "82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b".