|
pspsdk-1.0+beta2
|

Macros | |
| #define | BRG_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ |
| #define | BRG_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ |
| #define | PLATFORM_BYTE_ORDER BRG_LITTLE_ENDIAN |
| #define | rotl32(x, n) (((x) << n) | ((x) >> (32 - n))) |
| #define | rotr32(x, n) (((x) >> n) | ((x) << (32 - n))) |
| #define | bswap_32(x) ((rotr32((x), 24) & 0x00ff00ff) | (rotr32((x), 8) & 0xff00ff00)) |
| #define | SWAP_BYTES |
| #define | bsw_32(p, n) { int _i = (n); while(_i--) ((sha1_32t*)p)[_i] = bswap_32(((sha1_32t*)p)[_i]); } |
| #define | SHA1_MASK (SHA1_BLOCK_SIZE - 1) |
| #define | ch(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) |
| #define | parity(x, y, z) ((x) ^ (y) ^ (z)) |
| #define | maj(x, y, z) (((x) & (y)) | ((z) & ((x) ^ (y)))) |
| #define | q(v, n) v##n |
| #define | one_cycle(v, a, b, c, d, e, f, k, h) |
| #define | five_cycle(v, f, k, i) |
| #define | hf(i) w[i] |
| #define | hf(i) |
Functions | |
| void | sha1_compile (sha1_ctx ctx[1]) |
| void | sha1_begin (sha1_ctx ctx[1]) |
| void | sha1_hash (const unsigned char data[], unsigned long len, sha1_ctx ctx[1]) |
| void | sha1_end (unsigned char hval[], sha1_ctx ctx[1]) |
| void | sha1 (unsigned char hval[], const unsigned char data[], unsigned long len) |
| #define BRG_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ |
| #define BRG_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ |
| #define bsw_32 | ( | p, | |
| n | |||
| ) | { int _i = (n); while(_i--) ((sha1_32t*)p)[_i] = bswap_32(((sha1_32t*)p)[_i]); } |
Referenced by sha1_end(), and sha1_hash().
Referenced by getDebugChar(), process_args(), and sha1_compile().
Referenced by sha1_compile().
| #define hf | ( | i | ) |
| #define PLATFORM_BYTE_ORDER BRG_LITTLE_ENDIAN |
| #define q | ( | v, | |
| n | |||
| ) | v##n |
| #define SHA1_MASK (SHA1_BLOCK_SIZE - 1) |
Referenced by sha1_end(), and sha1_hash().
| #define SWAP_BYTES |
| void sha1 | ( | unsigned char | hval[], |
| const unsigned char | data[], | ||
| unsigned long | len | ||
| ) |
References sha1_begin(), sha1_end(), and sha1_hash().
Referenced by load_mapfile(), psp_export_func_hash(), and psp_export_var_hash().
| void sha1_begin | ( | sha1_ctx | ctx[1] | ) |
References sha1_ctx::count, and sha1_ctx::hash.
Referenced by sha1().
| void sha1_compile | ( | sha1_ctx | ctx[1] | ) |
References ch, five_cycle, sha1_ctx::hash, hf, maj, memcpy(), one_cycle, parity, v0, v1, w, and sha1_ctx::wbuf.
Referenced by sha1_end(), and sha1_hash().
| void sha1_end | ( | unsigned char | hval[], |
| sha1_ctx | ctx[1] | ||
| ) |
References bsw_32, sha1_ctx::count, sha1_ctx::hash, i, SHA1_BLOCK_SIZE, sha1_compile(), SHA1_DIGEST_SIZE, SHA1_MASK, and sha1_ctx::wbuf.
Referenced by sha1().
| void sha1_hash | ( | const unsigned char | data[], |
| unsigned long | len, | ||
| sha1_ctx | ctx[1] | ||
| ) |
References bsw_32, sha1_ctx::count, memcpy(), SHA1_BLOCK_SIZE, sha1_compile(), SHA1_MASK, sp, and sha1_ctx::wbuf.
Referenced by sha1().