|
libosmogsm 1.11.0.52-28973f
Osmocom GSM library
|
Macros | |
| #define | SHA1HANDSOFF |
| #define | rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) |
| #define | blk0(i) |
| #define | blk(i) |
| #define | R0(v, w, x, y, z, i) |
| #define | R1(v, w, x, y, z, i) |
| #define | R2(v, w, x, y, z, i) z += (w ^ x ^ y) + blk(i) + 0x6ED9EBA1 + rol(v, 5); w = rol(w, 30); |
| #define | R3(v, w, x, y, z, i) |
| #define | R4(v, w, x, y, z, i) |
Typedefs | |
| typedef struct SHA1Context | SHA1_CTX |
Functions | |
| void | SHA1Transform (u32 state[5], const unsigned char buffer[64]) |
| int | sha1_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) |
| sha1_vector - SHA-1 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 of failure More... | |
| void | SHA1Init (SHA1_CTX *context) |
| void | SHA1Update (SHA1_CTX *context, const void *_data, u32 len) |
| void | SHA1Final (unsigned char digest[20], SHA1_CTX *context) |
| #define blk | ( | i | ) |
| #define blk0 | ( | i | ) |
| #define R0 | ( | v, | |
| w, | |||
| x, | |||
| y, | |||
| z, | |||
| i | |||
| ) |
| #define R1 | ( | v, | |
| w, | |||
| x, | |||
| y, | |||
| z, | |||
| i | |||
| ) |
| #define R3 | ( | v, | |
| w, | |||
| x, | |||
| y, | |||
| z, | |||
| i | |||
| ) |
| #define R4 | ( | v, | |
| w, | |||
| x, | |||
| y, | |||
| z, | |||
| i | |||
| ) |
| #define rol | ( | value, | |
| bits | |||
| ) | (((value) << (bits)) | ((value) >> (32 - (bits)))) |
| #define SHA1HANDSOFF |
| typedef struct SHA1Context SHA1_CTX |
sha1_vector - SHA-1 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 of failure
sha1_vector - SHA-1 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 on failure
References len, SHA1Final(), SHA1Init(), and SHA1Update().
Referenced by hmac_sha1_vector().
| void SHA1Final | ( | unsigned char | digest[20], |
| SHA1_CTX * | context | ||
| ) |
References SHA1Context::buffer, SHA1Context::count, os_memset, SHA1Update(), and SHA1Context::state.
Referenced by sha1_vector().
| void SHA1Init | ( | SHA1_CTX * | context | ) |
References SHA1Context::count, and SHA1Context::state.
Referenced by sha1_vector().
| void SHA1Transform | ( | u32 | state[5], |
| const unsigned char | buffer[64] | ||
| ) |
References SHA1Context::buffer, SHA1Context::count, data, len, os_memcpy, SHA1Transform(), and SHA1Context::state.
Referenced by sha1_vector(), and SHA1Final().