Arbiter  0.0.0
sha256.hpp
1 #pragma once
2 
3 #include <cstddef>
4 #include <string>
5 #include <vector>
6 
7 // SHA256 implementation adapted from:
8 // https://github.com/B-Con/crypto-algorithms
9 // HMAC:
10 // https://en.wikipedia.org/wiki/Hash-based_message_authentication_code
11 
12 #ifdef ARBITER_CUSTOM_NAMESPACE
13 namespace ARBITER_CUSTOM_NAMESPACE
14 {
15 #endif
16 
17 namespace arbiter
18 {
19 namespace crypto
20 {
21 
22 std::vector<char> sha256(const std::vector<char>& data);
23 std::string sha256(const std::string& data);
24 
25 std::string hmacSha256(const std::string& key, const std::string& data);
26 
27 } // namespace crypto
28 } // namespace arbiter
29 
30 #ifdef ARBITER_CUSTOM_NAMESPACE
31 }
32 #endif
33 
Definition: arbiter.cpp:16