Raven Core  3.0.0
P2P Digital Currency
hmac_sha512.h
Go to the documentation of this file.
1 // Copyright (c) 2014 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_CRYPTO_HMAC_SHA512_H
7 #define RAVEN_CRYPTO_HMAC_SHA512_H
8 
9 #include "crypto/sha512.h"
10 
11 #include <stdint.h>
12 #include <stdlib.h>
13 
16 {
17 private:
20 
21 public:
22  static const size_t OUTPUT_SIZE = 64;
23 
24  CHMAC_SHA512(const unsigned char* key, size_t keylen);
25  CHMAC_SHA512& Write(const unsigned char* data, size_t len)
26  {
27  inner.Write(data, len);
28  return *this;
29  }
30  void Finalize(unsigned char hash[OUTPUT_SIZE]);
31 };
32 
33 #endif // RAVEN_CRYPTO_HMAC_SHA512_H
void Finalize(unsigned char hash[OUTPUT_SIZE])
Definition: hmac_sha512.cpp:30
CHMAC_SHA512 & Write(const unsigned char *data, size_t len)
Definition: hmac_sha512.h:25
static const size_t OUTPUT_SIZE
Definition: hmac_sha512.h:22
CSHA512 outer
Definition: hmac_sha512.h:18
CSHA512 & Write(const unsigned char *data, size_t len)
Definition: sha512.cpp:160
CHMAC_SHA512(const unsigned char *key, size_t keylen)
Definition: hmac_sha512.cpp:10
A hasher class for SHA-512.
Definition: sha512.h:13
CSHA512 inner
Definition: hmac_sha512.h:19
A hasher class for HMAC-SHA-512.
Definition: hmac_sha512.h:15