This commit is contained in:
Jay D Dee
2019-11-26 09:22:03 -05:00
parent a52c5eccf7
commit 91ec6f1771
28 changed files with 7609 additions and 41 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include <cstdint>
namespace hash {
using BitSequence = unsigned char;
using DataLength = unsigned long long;
struct hash_interface {
virtual ~hash_interface() = default;
virtual int Init(int hash_bitsize) = 0;
virtual int Update(const BitSequence *data, DataLength data_bitsize) = 0;
virtual int Final(BitSequence *hash) = 0;
virtual int
Hash(int hash_bitsize, const BitSequence *data, DataLength data_bitsize, BitSequence *hash) = 0;
};
} // namespace hash