RINASim
October 2016
Documentation of framework for OMNeT++
|
#include <cstring>
#include <string>
#include <cstdio>
Go to the source code of this file.
Classes | |
class | SHA256 |
Macros | |
#define | SHA2_SHFR(x, n) (x >> n) |
#define | SHA2_ROTR(x, n) ((x >> n) | (x << ((sizeof(x) << 3) - n))) |
#define | SHA2_ROTL(x, n) ((x << n) | (x >> ((sizeof(x) << 3) - n))) |
#define | SHA2_CH(x, y, z) ((x & y) ^ (~x & z)) |
#define | SHA2_MAJ(x, y, z) ((x & y) ^ (x & z) ^ (y & z)) |
#define | SHA256_F1(x) (SHA2_ROTR(x, 2) ^ SHA2_ROTR(x, 13) ^ SHA2_ROTR(x, 22)) |
#define | SHA256_F2(x) (SHA2_ROTR(x, 6) ^ SHA2_ROTR(x, 11) ^ SHA2_ROTR(x, 25)) |
#define | SHA256_F3(x) (SHA2_ROTR(x, 7) ^ SHA2_ROTR(x, 18) ^ SHA2_SHFR(x, 3)) |
#define | SHA256_F4(x) (SHA2_ROTR(x, 17) ^ SHA2_ROTR(x, 19) ^ SHA2_SHFR(x, 10)) |
#define | SHA2_UNPACK32(x, str) |
#define | SHA2_PACK32(str, x) |
Functions | |
std::string | sha256 (std::string input) |
Definition at line 65 of file SHA256.h.
Referenced by SHA256::transform().
Definition at line 66 of file SHA256.h.
Referenced by SHA256::transform().
Definition at line 67 of file SHA256.h.
Referenced by SHA256::transform().
Definition at line 68 of file SHA256.h.
Referenced by SHA256::transform().
#define SHA2_CH | ( | x, | |
y, | |||
z | |||
) | ((x & y) ^ (~x & z)) |
Definition at line 63 of file SHA256.h.
Referenced by SHA256::transform().
#define SHA2_MAJ | ( | x, | |
y, | |||
z | |||
) | ((x & y) ^ (x & z) ^ (y & z)) |
Definition at line 64 of file SHA256.h.
Referenced by SHA256::transform().
#define SHA2_PACK32 | ( | str, | |
x | |||
) |
Definition at line 76 of file SHA256.h.
Referenced by SHA256::transform().
#define SHA2_ROTL | ( | x, | |
n | |||
) | ((x << n) | (x >> ((sizeof(x) << 3) - n))) |
#define SHA2_ROTR | ( | x, | |
n | |||
) | ((x >> n) | (x << ((sizeof(x) << 3) - n))) |
#define SHA2_UNPACK32 | ( | x, | |
str | |||
) |
Definition at line 69 of file SHA256.h.
Referenced by SHA256::final().