diff options
Diffstat (limited to 'include/sha.h')
-rw-r--r-- | include/sha.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/sha.h b/include/sha.h index 255c769..8459ca2 100644 --- a/include/sha.h +++ b/include/sha.h @@ -7,17 +7,19 @@ #ifndef HMACSHA256_SHA_H_ #define HMACSHA256_SHA_H_ -#include<cstdint> -#include<array> +#include <array> +#include <cstdint> namespace hmacsha256 { class SHA { public: - SHA() { + SHA() + { digest_ = new uint8_t[32]; } - ~SHA() { + ~SHA() + { delete digest_; } @@ -25,6 +27,7 @@ public: virtual uint8_t* digest() = 0; virtual std::string hexdigest() = 0; + protected: uint8_t* digest_; @@ -51,7 +54,6 @@ protected: virtual void transform() = 0; }; - } // namespace hmacsha256 #endif // HMACSHA256_SHA_H_ |