diff options
Diffstat (limited to 'src/buildtool/crypto/hasher.cpp')
-rw-r--r-- | src/buildtool/crypto/hasher.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/buildtool/crypto/hasher.cpp b/src/buildtool/crypto/hasher.cpp new file mode 100644 index 00000000..6f432679 --- /dev/null +++ b/src/buildtool/crypto/hasher.cpp @@ -0,0 +1,14 @@ +#include "src/buildtool/crypto/hasher.hpp" + +#include "src/buildtool/crypto/hash_impl_sha1.hpp" +#include "src/buildtool/crypto/hash_impl_sha256.hpp" + +auto Hasher::CreateHashImpl(HashType type) noexcept + -> std::unique_ptr<IHashImpl> { + switch (type) { + case HashType::SHA1: + return CreateHashImplSha1(); + case HashType::SHA256: + return CreateHashImplSha256(); + } +} |