Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'coding/sha1.hpp')
-rw-r--r--coding/sha1.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/coding/sha1.hpp b/coding/sha1.hpp
new file mode 100644
index 0000000000..d46a718028
--- /dev/null
+++ b/coding/sha1.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <array>
+#include <string>
+
+namespace coding
+{
+class SHA1
+{
+public:
+ static size_t constexpr kHashSizeInBytes = 20;
+ using Hash = std::array<uint8_t, kHashSizeInBytes>;
+
+ static Hash Calculate(std::string const & filePath);
+ static std::string CalculateBase64(std::string const & filePath);
+};
+} // coding