hash: class decleration style

This commit is contained in:
Danny Robson 2016-06-17 15:57:09 +10:00
parent 51487cd34e
commit ef17f9c7d1
5 changed files with 109 additions and 119 deletions

View File

@ -21,8 +21,7 @@
#include <cstdint> #include <cstdint>
namespace util { namespace util { namespace hash {
namespace hash {
class MD2 { class MD2 {
public: public:
typedef std::array<uint8_t,16> digest_t; typedef std::array<uint8_t,16> digest_t;
@ -46,7 +45,6 @@ namespace util {
uint8_t C[16]; uint8_t C[16];
uint8_t X[48]; uint8_t X[48];
}; };
} } }
}
#endif #endif

View File

@ -20,8 +20,7 @@
#include <array> #include <array>
#include <cstdint> #include <cstdint>
namespace util { namespace util { namespace hash {
namespace hash {
class MD4 { class MD4 {
public: public:
typedef std::array<uint8_t,16> digest_t; typedef std::array<uint8_t,16> digest_t;
@ -48,7 +47,6 @@ namespace util {
uint8_t Xb[64]; uint8_t Xb[64];
}; };
}; };
} } }
}
#endif #endif

View File

@ -21,8 +21,7 @@
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>
namespace util { namespace util { namespace hash {
namespace hash {
class MD5 { class MD5 {
public: public:
typedef std::array<uint8_t,16> digest_t; typedef std::array<uint8_t,16> digest_t;
@ -51,10 +50,9 @@ namespace util {
uint8_t Xb[64]; uint8_t Xb[64];
}; };
}; };
}
typedef uint8_t md5_t; typedef uint8_t md5_t;
md5_t md5 (const void *restrict data, size_t len); md5_t md5 (const void *restrict data, size_t len);
} } }
#endif #endif

View File

@ -20,8 +20,7 @@
#include <array> #include <array>
namespace util { namespace util { namespace hash {
namespace hash {
class RIPEMD { class RIPEMD {
public: public:
typedef std::array<uint8_t,20> digest_t; typedef std::array<uint8_t,20> digest_t;
@ -52,7 +51,6 @@ namespace util {
size_t size; size_t size;
} m_buffer; } m_buffer;
}; };
} } }
}
#endif #endif

View File

@ -21,8 +21,7 @@
#include <array> #include <array>
#include <cstdint> #include <cstdint>
namespace util { namespace util { namespace hash {
namespace hash {
class SHA256 { class SHA256 {
public: public:
typedef std::array<uint8_t,32> digest_t; typedef std::array<uint8_t,32> digest_t;
@ -49,7 +48,6 @@ namespace util {
std::array<uint8_t, 64> C; std::array<uint8_t, 64> C;
}; };
}; };
} } }
}
#endif #endif