hdac SDK
SDK for hdac blockchain development
hmac_sha512.h
1 // Copyright (c) 2014 The Bitcoin developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_CRYPTO_HMAC_SHA512_H
6 #define BITCOIN_CRYPTO_HMAC_SHA512_H
7 
8 #include "sha512.h"
9 
10 #include <stdint.h>
11 #include <stdlib.h>
12 
13 #include "crypto_global.h"
14 
17 {
18 private:
19  CSHA512 outer;
20  CSHA512 inner;
21 
22 public:
23  static const size_t OUTPUT_SIZE = 64;
24 
25  CHMAC_SHA512(const unsigned char* key, size_t keylen);
26  CHMAC_SHA512& Write(const unsigned char* data, size_t len)
27  {
28  inner.Write(data, len);
29  return *this;
30  }
31  void Finalize(unsigned char hash[OUTPUT_SIZE]);
32 };
33 
34 #endif // BITCOIN_CRYPTO_HMAC_SHA512_H
Definition: sha512.h:14
Definition: hmac_sha512.h:16