Sha256: 02af906b565838c95ef9d28e56ac9e313059b54ecff416c936174aad835e2713

Contents?: true

Size: 381 Bytes

Versions: 4

Compression:

Stored size: 381 Bytes

Contents

#include "api.h"
#include "crypto_verify_64.h"
#include "utils.h"

int crypto_auth_verify(const unsigned char *h, const unsigned char *in,
                       unsigned long long inlen, const unsigned char *k)
{
  unsigned char correct[64];
  crypto_auth(correct,in,inlen,k);
  return crypto_verify_64(h,correct) | (-(h - correct == 0)) |
         sodium_memcmp(correct,h,64);
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rbnacl-libsodium-1.0.2 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c
rbnacl-libsodium-1.0.1 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c
rbnacl-libsodium-1.0.0 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c
rbnacl-libsodium-0.7.0 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c