summaryrefslogtreecommitdiff
path: root/include/sha.h
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-10-15 19:37:42 +0200
committerSanto Cariotti <santo@dcariotti.me>2021-10-15 19:38:28 +0200
commit0bc41054fbafbe2394a158e06850347243457b53 (patch)
treebe2c64c5309e30d4917b4a43c6ecb8f6a94a22aa /include/sha.h
parentfc9b28a97b9c8124840a82d798b7b1be18ecad43 (diff)
style: clang-formatmain
Diffstat (limited to 'include/sha.h')
-rw-r--r--include/sha.h12
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_