Sha256: c2c078cea23874495302a5f1f3a7cb3943875207b32d0093790ddca820ad0919

Contents?: true

Size: 515 Bytes

Versions: 5

Compression:

Stored size: 515 Bytes

Contents

#include "crypto_auth_hmacsha512256.h"
#include "crypto_verify_32.h"
#include "utils.h"

int crypto_auth_hmacsha512256_verify(const unsigned char *h,
                                     const unsigned char *in,
                                     unsigned long long inlen,
                                     const unsigned char *k)
{
  unsigned char correct[32];
  crypto_auth_hmacsha512256(correct,in,inlen,k);
  return crypto_verify_32(h,correct) | (-(h == correct)) |
         sodium_memcmp(correct,h,32);
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rbnacl-libsodium-1.0.11 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c
rbnacl-libsodium-1.0.10 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c
rbnacl-libsodium-1.0.9 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c
rbnacl-libsodium-1.0.8 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c
rbnacl-libsodium-1.0.7 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c