summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-01 20:51:28 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-01 20:51:28 +0100
commitfc9b28a97b9c8124840a82d798b7b1be18ecad43 (patch)
tree2d226f4a21c2f3a2d737582905ec532331d260b4 /src
parentf4fd89c776c9dccecc661058d272c7b252f6e85c (diff)
chore: split sha256 in base sha class
Diffstat (limited to 'src')
-rw-r--r--src/sha256.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/sha256.cc b/src/sha256.cc
index 7ef467e..7790f8a 100644
--- a/src/sha256.cc
+++ b/src/sha256.cc
@@ -8,7 +8,6 @@ hmacsha256::SHA256::SHA256(const uint8_t* data, uint32_t length) {
}
void hmacsha256::SHA256::init(const uint8_t* data, uint32_t length) {
- digest_ = new uint8_t[32];
message_l_ = bit_len_ = 0;
vars_[0] = 0x6a09e667;
vars_[1] = 0xbb67ae85;
@@ -30,10 +29,6 @@ void hmacsha256::SHA256::init(const uint8_t* data, uint32_t length) {
}
}
-hmacsha256::SHA256::~SHA256() {
- delete digest_;
-}
-
hmacsha256::SHA256::SHA256(const std::string& data) {
init(reinterpret_cast<const uint8_t*> (data.c_str()), data.size());
}