diff options
Diffstat (limited to 'Swiften/StringCodecs/SHA1.h')
-rw-r--r-- | Swiften/StringCodecs/SHA1.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/StringCodecs/SHA1.h b/Swiften/StringCodecs/SHA1.h index 671d890..25bfa54 100644 --- a/Swiften/StringCodecs/SHA1.h +++ b/Swiften/StringCodecs/SHA1.h @@ -10,6 +10,7 @@ #include <boost/cstdint.hpp> #include <Swiften/Base/ByteArray.h> +#include <Swiften/Base/SafeByteArray.h> namespace Swift { class SHA1 { @@ -26,6 +27,8 @@ namespace Swift { */ static ByteArray getHash(const ByteArray& data); + static ByteArray getHash(const SafeByteArray& data); + private: typedef struct { boost::uint32_t state[5]; @@ -37,6 +40,8 @@ namespace Swift { static void Update(CTX* context, boost::uint8_t* data, unsigned int len); static void Final(boost::uint8_t digest[20], CTX* context); + template<typename Container> static ByteArray getHashInternal(const Container& input); + private: CTX context; }; |