File: sha2.h

package info (click to toggle)
ruby-bcrypt-pbkdf 1.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216 kB
  • sloc: ansic: 1,062; ruby: 71; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "crypto_hash_sha512.h"

#define SHA2_CTX crypto_hash_sha512_state

#ifdef SHA512_DIGEST_LENGTH
# undef SHA512_DIGEST_LENGTH
#endif
#define SHA512_DIGEST_LENGTH crypto_hash_sha512_BYTES

inline static void SHA512Init(SHA2_CTX* ctx) { crypto_hash_sha512_init(ctx); }
inline static void SHA512Update(SHA2_CTX* ctx, const void *in, size_t inlen) { crypto_hash_sha512_update(ctx, in, inlen); }
inline static void SHA512Final(uint8_t* out, SHA2_CTX* ctx) { crypto_hash_sha512_final(ctx, out); }