RetroArch
|
#include "mbedtls/config.h"
#include "mbedtls/ripemd160.h"
#include <string.h>
#include "mbedtls/platform.h"
#include "arc4_alt.h"
Macros | |
#define | GET_UINT32_LE(n, b, i) |
#define | PUT_UINT32_LE(n, b, i) |
#define | F1(x, y, z) ( x ^ y ^ z ) |
#define | F2(x, y, z) ( ( x & y ) | ( ~x & z ) ) |
#define | F3(x, y, z) ( ( x | ~y ) ^ z ) |
#define | F4(x, y, z) ( ( x & z ) | ( y & ~z ) ) |
#define | F5(x, y, z) ( x ^ ( y | ~z ) ) |
#define | S(x, n) ( ( x << n ) | ( x >> (32 - n) ) ) |
#define | P(a, b, c, d, e, r, s, f, k) |
#define | P2(a, b, c, d, e, r, s, rp, sp) |
#define | F F1 |
#define | K 0x00000000 |
#define | Fp F5 |
#define | Kp 0x50A28BE6 |
#define | F F2 |
#define | K 0x5A827999 |
#define | Fp F4 |
#define | Kp 0x5C4DD124 |
#define | F F3 |
#define | K 0x6ED9EBA1 |
#define | Fp F3 |
#define | Kp 0x6D703EF3 |
#define | F F4 |
#define | K 0x8F1BBCDC |
#define | Fp F2 |
#define | Kp 0x7A6D76E9 |
#define | F F5 |
#define | K 0xA953FD4E |
#define | Fp F1 |
#define | Kp 0x00000000 |
#define | TESTS 8 |
#define | KEYS 2 |
Variables | |
static const unsigned char | ripemd160_padding [64] |
static const char * | ripemd160_test_input [TESTS] |
static const unsigned char | ripemd160_test_md [TESTS][20] |
#define F F1 |
#define F F2 |
#define F F3 |
#define F F4 |
#define F F5 |
#define Fp F5 |
#define Fp F4 |
#define Fp F3 |
#define Fp F2 |
#define Fp F1 |
#define K 0x00000000 |
#define K 0x5A827999 |
#define K 0x6ED9EBA1 |
#define K 0x8F1BBCDC |
#define K 0xA953FD4E |
#define KEYS 2 |
#define Kp 0x50A28BE6 |
#define Kp 0x5C4DD124 |
#define Kp 0x6D703EF3 |
#define Kp 0x7A6D76E9 |
#define Kp 0x00000000 |
#define TESTS 8 |
Output = RIPEMD-160( input buffer )
input | buffer holding the data |
ilen | length of the input data |
output | RIPEMD-160 checksum result |
void mbedtls_ripemd160_clone | ( | mbedtls_ripemd160_context * | dst, |
const mbedtls_ripemd160_context * | src | ||
) |
Clone (the state of) an RIPEMD-160 context.
dst | The destination context |
src | The context to be cloned |
void mbedtls_ripemd160_finish | ( | mbedtls_ripemd160_context * | ctx, |
unsigned char | output[20] | ||
) |
RIPEMD-160 final digest.
ctx | RIPEMD-160 context |
output | RIPEMD-160 checksum result |
void mbedtls_ripemd160_free | ( | mbedtls_ripemd160_context * | ctx | ) |
Clear RIPEMD-160 context.
ctx | RIPEMD-160 context to be cleared |
void mbedtls_ripemd160_init | ( | mbedtls_ripemd160_context * | ctx | ) |
Initialize RIPEMD-160 context.
ctx | RIPEMD-160 context to be initialized |
void mbedtls_ripemd160_process | ( | mbedtls_ripemd160_context * | ctx, |
const unsigned char | data[64] | ||
) |
int mbedtls_ripemd160_self_test | ( | int | verbose | ) |
Checkup routine.
void mbedtls_ripemd160_starts | ( | mbedtls_ripemd160_context * | ctx | ) |
RIPEMD-160 context setup.
ctx | context to be initialized |
void mbedtls_ripemd160_update | ( | mbedtls_ripemd160_context * | ctx, |
const unsigned char * | input, | ||
size_t | ilen | ||
) |
RIPEMD-160 process buffer.
ctx | RIPEMD-160 context |
input | buffer holding the data |
ilen | length of the input data |
|
static |