#include <stddef.h>
#include <string>
#include <cstring>
Go to the source code of this file.
Classes | |
struct | websocketpp::md5::md5_state_s |
Namespaces | |
websocketpp | |
Namespace for the WebSocket++ project. | |
websocketpp::md5 | |
Provides MD5 hashing functionality. | |
Macros | |
#define | ZSW_MD5_BYTE_ORDER 0 |
#define | ZSW_MD5_T_MASK ((md5_word_t)~0) |
#define | ZSW_MD5_T1 /* 0xd76aa478 */ (ZSW_MD5_T_MASK ^ 0x28955b87) |
#define | ZSW_MD5_T2 /* 0xe8c7b756 */ (ZSW_MD5_T_MASK ^ 0x173848a9) |
#define | ZSW_MD5_T3 0x242070db |
#define | ZSW_MD5_T4 /* 0xc1bdceee */ (ZSW_MD5_T_MASK ^ 0x3e423111) |
#define | ZSW_MD5_T5 /* 0xf57c0faf */ (ZSW_MD5_T_MASK ^ 0x0a83f050) |
#define | ZSW_MD5_T6 0x4787c62a |
#define | ZSW_MD5_T7 /* 0xa8304613 */ (ZSW_MD5_T_MASK ^ 0x57cfb9ec) |
#define | ZSW_MD5_T8 /* 0xfd469501 */ (ZSW_MD5_T_MASK ^ 0x02b96afe) |
#define | ZSW_MD5_T9 0x698098d8 |
#define | ZSW_MD5_T10 /* 0x8b44f7af */ (ZSW_MD5_T_MASK ^ 0x74bb0850) |
#define | ZSW_MD5_T11 /* 0xffff5bb1 */ (ZSW_MD5_T_MASK ^ 0x0000a44e) |
#define | ZSW_MD5_T12 /* 0x895cd7be */ (ZSW_MD5_T_MASK ^ 0x76a32841) |
#define | ZSW_MD5_T13 0x6b901122 |
#define | ZSW_MD5_T14 /* 0xfd987193 */ (ZSW_MD5_T_MASK ^ 0x02678e6c) |
#define | ZSW_MD5_T15 /* 0xa679438e */ (ZSW_MD5_T_MASK ^ 0x5986bc71) |
#define | ZSW_MD5_T16 0x49b40821 |
#define | ZSW_MD5_T17 /* 0xf61e2562 */ (ZSW_MD5_T_MASK ^ 0x09e1da9d) |
#define | ZSW_MD5_T18 /* 0xc040b340 */ (ZSW_MD5_T_MASK ^ 0x3fbf4cbf) |
#define | ZSW_MD5_T19 0x265e5a51 |
#define | ZSW_MD5_T20 /* 0xe9b6c7aa */ (ZSW_MD5_T_MASK ^ 0x16493855) |
#define | ZSW_MD5_T21 /* 0xd62f105d */ (ZSW_MD5_T_MASK ^ 0x29d0efa2) |
#define | ZSW_MD5_T22 0x02441453 |
#define | ZSW_MD5_T23 /* 0xd8a1e681 */ (ZSW_MD5_T_MASK ^ 0x275e197e) |
#define | ZSW_MD5_T24 /* 0xe7d3fbc8 */ (ZSW_MD5_T_MASK ^ 0x182c0437) |
#define | ZSW_MD5_T25 0x21e1cde6 |
#define | ZSW_MD5_T26 /* 0xc33707d6 */ (ZSW_MD5_T_MASK ^ 0x3cc8f829) |
#define | ZSW_MD5_T27 /* 0xf4d50d87 */ (ZSW_MD5_T_MASK ^ 0x0b2af278) |
#define | ZSW_MD5_T28 0x455a14ed |
#define | ZSW_MD5_T29 /* 0xa9e3e905 */ (ZSW_MD5_T_MASK ^ 0x561c16fa) |
#define | ZSW_MD5_T30 /* 0xfcefa3f8 */ (ZSW_MD5_T_MASK ^ 0x03105c07) |
#define | ZSW_MD5_T31 0x676f02d9 |
#define | ZSW_MD5_T32 /* 0x8d2a4c8a */ (ZSW_MD5_T_MASK ^ 0x72d5b375) |
#define | ZSW_MD5_T33 /* 0xfffa3942 */ (ZSW_MD5_T_MASK ^ 0x0005c6bd) |
#define | ZSW_MD5_T34 /* 0x8771f681 */ (ZSW_MD5_T_MASK ^ 0x788e097e) |
#define | ZSW_MD5_T35 0x6d9d6122 |
#define | ZSW_MD5_T36 /* 0xfde5380c */ (ZSW_MD5_T_MASK ^ 0x021ac7f3) |
#define | ZSW_MD5_T37 /* 0xa4beea44 */ (ZSW_MD5_T_MASK ^ 0x5b4115bb) |
#define | ZSW_MD5_T38 0x4bdecfa9 |
#define | ZSW_MD5_T39 /* 0xf6bb4b60 */ (ZSW_MD5_T_MASK ^ 0x0944b49f) |
#define | ZSW_MD5_T40 /* 0xbebfbc70 */ (ZSW_MD5_T_MASK ^ 0x4140438f) |
#define | ZSW_MD5_T41 0x289b7ec6 |
#define | ZSW_MD5_T42 /* 0xeaa127fa */ (ZSW_MD5_T_MASK ^ 0x155ed805) |
#define | ZSW_MD5_T43 /* 0xd4ef3085 */ (ZSW_MD5_T_MASK ^ 0x2b10cf7a) |
#define | ZSW_MD5_T44 0x04881d05 |
#define | ZSW_MD5_T45 /* 0xd9d4d039 */ (ZSW_MD5_T_MASK ^ 0x262b2fc6) |
#define | ZSW_MD5_T46 /* 0xe6db99e5 */ (ZSW_MD5_T_MASK ^ 0x1924661a) |
#define | ZSW_MD5_T47 0x1fa27cf8 |
#define | ZSW_MD5_T48 /* 0xc4ac5665 */ (ZSW_MD5_T_MASK ^ 0x3b53a99a) |
#define | ZSW_MD5_T49 /* 0xf4292244 */ (ZSW_MD5_T_MASK ^ 0x0bd6ddbb) |
#define | ZSW_MD5_T50 0x432aff97 |
#define | ZSW_MD5_T51 /* 0xab9423a7 */ (ZSW_MD5_T_MASK ^ 0x546bdc58) |
#define | ZSW_MD5_T52 /* 0xfc93a039 */ (ZSW_MD5_T_MASK ^ 0x036c5fc6) |
#define | ZSW_MD5_T53 0x655b59c3 |
#define | ZSW_MD5_T54 /* 0x8f0ccc92 */ (ZSW_MD5_T_MASK ^ 0x70f3336d) |
#define | ZSW_MD5_T55 /* 0xffeff47d */ (ZSW_MD5_T_MASK ^ 0x00100b82) |
#define | ZSW_MD5_T56 /* 0x85845dd1 */ (ZSW_MD5_T_MASK ^ 0x7a7ba22e) |
#define | ZSW_MD5_T57 0x6fa87e4f |
#define | ZSW_MD5_T58 /* 0xfe2ce6e0 */ (ZSW_MD5_T_MASK ^ 0x01d3191f) |
#define | ZSW_MD5_T59 /* 0xa3014314 */ (ZSW_MD5_T_MASK ^ 0x5cfebceb) |
#define | ZSW_MD5_T60 0x4e0811a1 |
#define | ZSW_MD5_T61 /* 0xf7537e82 */ (ZSW_MD5_T_MASK ^ 0x08ac817d) |
#define | ZSW_MD5_T62 /* 0xbd3af235 */ (ZSW_MD5_T_MASK ^ 0x42c50dca) |
#define | ZSW_MD5_T63 0x2ad7d2bb |
#define | ZSW_MD5_T64 /* 0xeb86d391 */ (ZSW_MD5_T_MASK ^ 0x14792c6e) |
#define | ZSW_MD5_ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) |
#define | ZSW_MD5_F(x, y, z) (((x) & (y)) | (~(x) & (z))) |
#define | SET(a, b, c, d, k, s, Ti) |
#define | ZSW_MD5_G(x, y, z) (((x) & (z)) | ((y) & ~(z))) |
#define | SET(a, b, c, d, k, s, Ti) |
#define | ZSW_MD5_H(x, y, z) ((x) ^ (y) ^ (z)) |
#define | SET(a, b, c, d, k, s, Ti) |
#define | ZSW_MD5_I(x, y, z) ((y) ^ ((x) | ~(z))) |
#define | SET(a, b, c, d, k, s, Ti) |
Typedefs | |
typedef unsigned char | websocketpp::md5::md5_byte_t |
typedef unsigned int | websocketpp::md5::md5_word_t |
typedef struct websocketpp::md5::md5_state_s | websocketpp::md5::md5_state_t |
Functions | |
void | websocketpp::md5::md5_init (md5_state_t *pms) |
void | websocketpp::md5::md5_append (md5_state_t *pms, md5_byte_t const *data, size_t nbytes) |
void | websocketpp::md5::md5_finish (md5_state_t *pms, md5_byte_t digest[16]) |
static void | websocketpp::md5::md5_process (md5_state_t *pms, md5_byte_t const *data) |
std::string | websocketpp::md5::md5_hash_string (std::string const &s) |
std::string | websocketpp::md5::md5_hash_hex (std::string const &input) |
Variables | |
const char | websocketpp::md5::hexval [16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'} |
#define ZSW_MD5_T_MASK ((md5_word_t)~0) |
Definition at line 104 of file md5.hpp.
Referenced by websocketpp::md5::md5_init().
#define ZSW_MD5_T1 /* 0xd76aa478 */ (ZSW_MD5_T_MASK ^ 0x28955b87) |
Definition at line 105 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T2 /* 0xe8c7b756 */ (ZSW_MD5_T_MASK ^ 0x173848a9) |
Definition at line 106 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T3 0x242070db |
Definition at line 107 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T4 /* 0xc1bdceee */ (ZSW_MD5_T_MASK ^ 0x3e423111) |
Definition at line 108 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T5 /* 0xf57c0faf */ (ZSW_MD5_T_MASK ^ 0x0a83f050) |
Definition at line 109 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T6 0x4787c62a |
Definition at line 110 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T7 /* 0xa8304613 */ (ZSW_MD5_T_MASK ^ 0x57cfb9ec) |
Definition at line 111 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T8 /* 0xfd469501 */ (ZSW_MD5_T_MASK ^ 0x02b96afe) |
Definition at line 112 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T9 0x698098d8 |
Definition at line 113 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T10 /* 0x8b44f7af */ (ZSW_MD5_T_MASK ^ 0x74bb0850) |
Definition at line 114 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T11 /* 0xffff5bb1 */ (ZSW_MD5_T_MASK ^ 0x0000a44e) |
Definition at line 115 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T12 /* 0x895cd7be */ (ZSW_MD5_T_MASK ^ 0x76a32841) |
Definition at line 116 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T13 0x6b901122 |
Definition at line 117 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T14 /* 0xfd987193 */ (ZSW_MD5_T_MASK ^ 0x02678e6c) |
Definition at line 118 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T15 /* 0xa679438e */ (ZSW_MD5_T_MASK ^ 0x5986bc71) |
Definition at line 119 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T16 0x49b40821 |
Definition at line 120 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T17 /* 0xf61e2562 */ (ZSW_MD5_T_MASK ^ 0x09e1da9d) |
Definition at line 121 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T18 /* 0xc040b340 */ (ZSW_MD5_T_MASK ^ 0x3fbf4cbf) |
Definition at line 122 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T19 0x265e5a51 |
Definition at line 123 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T20 /* 0xe9b6c7aa */ (ZSW_MD5_T_MASK ^ 0x16493855) |
Definition at line 124 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T21 /* 0xd62f105d */ (ZSW_MD5_T_MASK ^ 0x29d0efa2) |
Definition at line 125 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T22 0x02441453 |
Definition at line 126 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T23 /* 0xd8a1e681 */ (ZSW_MD5_T_MASK ^ 0x275e197e) |
Definition at line 127 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T24 /* 0xe7d3fbc8 */ (ZSW_MD5_T_MASK ^ 0x182c0437) |
Definition at line 128 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T25 0x21e1cde6 |
Definition at line 129 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T26 /* 0xc33707d6 */ (ZSW_MD5_T_MASK ^ 0x3cc8f829) |
Definition at line 130 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T27 /* 0xf4d50d87 */ (ZSW_MD5_T_MASK ^ 0x0b2af278) |
Definition at line 131 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T28 0x455a14ed |
Definition at line 132 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T29 /* 0xa9e3e905 */ (ZSW_MD5_T_MASK ^ 0x561c16fa) |
Definition at line 133 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T30 /* 0xfcefa3f8 */ (ZSW_MD5_T_MASK ^ 0x03105c07) |
Definition at line 134 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T31 0x676f02d9 |
Definition at line 135 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T32 /* 0x8d2a4c8a */ (ZSW_MD5_T_MASK ^ 0x72d5b375) |
Definition at line 136 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T33 /* 0xfffa3942 */ (ZSW_MD5_T_MASK ^ 0x0005c6bd) |
Definition at line 137 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T34 /* 0x8771f681 */ (ZSW_MD5_T_MASK ^ 0x788e097e) |
Definition at line 138 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T35 0x6d9d6122 |
Definition at line 139 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T36 /* 0xfde5380c */ (ZSW_MD5_T_MASK ^ 0x021ac7f3) |
Definition at line 140 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T37 /* 0xa4beea44 */ (ZSW_MD5_T_MASK ^ 0x5b4115bb) |
Definition at line 141 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T38 0x4bdecfa9 |
Definition at line 142 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T39 /* 0xf6bb4b60 */ (ZSW_MD5_T_MASK ^ 0x0944b49f) |
Definition at line 143 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T40 /* 0xbebfbc70 */ (ZSW_MD5_T_MASK ^ 0x4140438f) |
Definition at line 144 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T41 0x289b7ec6 |
Definition at line 145 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T42 /* 0xeaa127fa */ (ZSW_MD5_T_MASK ^ 0x155ed805) |
Definition at line 146 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T43 /* 0xd4ef3085 */ (ZSW_MD5_T_MASK ^ 0x2b10cf7a) |
Definition at line 147 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T44 0x04881d05 |
Definition at line 148 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T45 /* 0xd9d4d039 */ (ZSW_MD5_T_MASK ^ 0x262b2fc6) |
Definition at line 149 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T46 /* 0xe6db99e5 */ (ZSW_MD5_T_MASK ^ 0x1924661a) |
Definition at line 150 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T47 0x1fa27cf8 |
Definition at line 151 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T48 /* 0xc4ac5665 */ (ZSW_MD5_T_MASK ^ 0x3b53a99a) |
Definition at line 152 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T49 /* 0xf4292244 */ (ZSW_MD5_T_MASK ^ 0x0bd6ddbb) |
Definition at line 153 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T50 0x432aff97 |
Definition at line 154 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T51 /* 0xab9423a7 */ (ZSW_MD5_T_MASK ^ 0x546bdc58) |
Definition at line 155 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T52 /* 0xfc93a039 */ (ZSW_MD5_T_MASK ^ 0x036c5fc6) |
Definition at line 156 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T53 0x655b59c3 |
Definition at line 157 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T54 /* 0x8f0ccc92 */ (ZSW_MD5_T_MASK ^ 0x70f3336d) |
Definition at line 158 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T55 /* 0xffeff47d */ (ZSW_MD5_T_MASK ^ 0x00100b82) |
Definition at line 159 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T56 /* 0x85845dd1 */ (ZSW_MD5_T_MASK ^ 0x7a7ba22e) |
Definition at line 160 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T57 0x6fa87e4f |
Definition at line 161 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T58 /* 0xfe2ce6e0 */ (ZSW_MD5_T_MASK ^ 0x01d3191f) |
Definition at line 162 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T59 /* 0xa3014314 */ (ZSW_MD5_T_MASK ^ 0x5cfebceb) |
Definition at line 163 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T60 0x4e0811a1 |
Definition at line 164 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T61 /* 0xf7537e82 */ (ZSW_MD5_T_MASK ^ 0x08ac817d) |
Definition at line 165 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T62 /* 0xbd3af235 */ (ZSW_MD5_T_MASK ^ 0x42c50dca) |
Definition at line 166 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T63 0x2ad7d2bb |
Definition at line 167 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_T64 /* 0xeb86d391 */ (ZSW_MD5_T_MASK ^ 0x14792c6e) |
Definition at line 168 of file md5.hpp.
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_ROTATE_LEFT | ( | x, | |
n | |||
) | (((x) << (n)) | ((x) >> (32 - (n)))) |
#define ZSW_MD5_F | ( | x, | |
y, | |||
z | |||
) | (((x) & (y)) | (~(x) & (z))) |
#define SET | ( | a, | |
b, | |||
c, | |||
d, | |||
k, | |||
s, | |||
Ti | |||
) |
Referenced by websocketpp::md5::md5_process().
#define ZSW_MD5_G | ( | x, | |
y, | |||
z | |||
) | (((x) & (z)) | ((y) & ~(z))) |
#define SET | ( | a, | |
b, | |||
c, | |||
d, | |||
k, | |||
s, | |||
Ti | |||
) |
#define ZSW_MD5_H | ( | x, | |
y, | |||
z | |||
) | ((x) ^ (y) ^ (z)) |
#define SET | ( | a, | |
b, | |||
c, | |||
d, | |||
k, | |||
s, | |||
Ti | |||
) |
#define ZSW_MD5_I | ( | x, | |
y, | |||
z | |||
) | ((y) ^ ((x) | ~(z))) |
#define SET | ( | a, | |
b, | |||
c, | |||
d, | |||
k, | |||
s, | |||
Ti | |||
) |