Sha256: 82846c87d84714d11c548b646c13ad636f9e1ab101724c0fb0cce5fe52b4fa67

Contents?: true

Size: 408 Bytes

Versions: 8

Compression:

Stored size: 408 Bytes

Contents

#include <stdio.h>

#define TEST_NAME "auth"
#include "cmptest.h"

/* "Test Case 2" from RFC 4231 */
unsigned char key[32] = "Jefe";
unsigned char c[] = "what do ya want for nothing?";

unsigned char a[32];

int main(void)
{
  int i;
  crypto_auth_hmacsha512256(a,c,sizeof c - 1U,key);
  for (i = 0;i < 32;++i) {
    printf(",0x%02x",(unsigned int) a[i]);
    if (i % 8 == 7) printf("\n");
  }
  return 0;
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rbnacl-libsodium-0.7.0 vendor/libsodium/test/default/auth.c
rbnacl-libsodium-0.6.1 vendor/libsodium/test/default/auth.c
rbnacl-libsodium-0.6.0 vendor/libsodium/test/default/auth.c
rbnacl-libsodium-0.5.0.1 vendor/libsodium/test/default/auth.c
rbnacl-libsodium-0.5.0.1.pre vendor/libsodium/test/default/auth.c
rbnacl-libsodium-0.5.0 vendor/libsodium/test/default/auth.c
rbnacl-libsodium-0.4.5 vendor/libsodium/test/default/auth.c
rbnacl-libsodium-0.4.5a vendor/libsodium/test/default/auth.c