You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
423 B

  1. #define TEST_NAME "auth6"
  2. #include "cmptest.h"
  3. /* "Test Case 2" from RFC 4231 */
  4. unsigned char key[32] = "Jefe";
  5. unsigned char c[] = "what do ya want for nothing?";
  6. unsigned char a[64];
  7. int main(void)
  8. {
  9. int i;
  10. crypto_auth_hmacsha512(a, c, sizeof c - 1U, key);
  11. for (i = 0; i < 64; ++i) {
  12. printf(",0x%02x", (unsigned int)a[i]);
  13. if (i % 8 == 7)
  14. printf("\n");
  15. }
  16. return 0;
  17. }