#include "common.h"
#include "bswap.h"
#include "sha1.h"
Go to the source code of this file.
Data Structures | |
struct | AVSHA1 |
Defines | |
#define | rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) |
#define | blk0(i) (block[i] = be2me_32(((const uint32_t*)buffer)[i])) |
#define | blk(i) (block[i] = rol(block[i-3]^block[i-8]^block[i-14]^block[i-16],1)) |
#define | R0(v, w, x, y, z, i) z+=((w&(x^y))^y) +blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); |
#define | R1(v, w, x, y, z, i) z+=((w&(x^y))^y) +blk (i)+0x5A827999+rol(v,5);w=rol(w,30); |
#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) z+=(((w|x)&y)|(w&x))+blk (i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); |
#define | R4(v, w, x, y, z, i) z+=( w^x ^y) +blk (i)+0xCA62C1D6+rol(v,5);w=rol(w,30); |
Functions | |
static void | transform (uint32_t state[5], const uint8_t buffer[64]) |
void | av_sha1_init (AVSHA1 *ctx) |
void | av_sha1_update (AVSHA1 *ctx, const uint8_t *data, unsigned int len) |
void | av_sha1_final (AVSHA1 *ctx, uint8_t digest[20]) |
Variables | |
const int | av_sha1_size = sizeof(AVSHA1) |
Definition at line 38 of file sha1.c.
Referenced by ac3_decode_frame(), bit_alloc_masking(), decode_frame(), dv_calc_mb_coordinates(), dv_init_enc_block(), ff_eac3_decode_transform_coeffs_aht_ch(), ff_eac3_parse_header(), and vb_decode_framedata().
#define blk0 | ( | i | ) | (block[i] = be2me_32(((const uint32_t*)buffer)[i])) |
#define R0 | ( | v, | |||
w, | |||||
x, | |||||
y, | |||||
z, | |||||
i | ) | z+=((w&(x^y))^y) +blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); |
Definition at line 40 of file sha1.c.
Referenced by altivec_uyvy_rgb32(), altivec_yuv2packedX(), and transform().
#define R1 | ( | v, | |||
w, | |||||
x, | |||||
y, | |||||
z, | |||||
i | ) | z+=((w&(x^y))^y) +blk (i)+0x5A827999+rol(v,5);w=rol(w,30); |
#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 | ) | z+=(((w|x)&y)|(w&x))+blk (i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); |
#define R4 | ( | v, | |||
w, | |||||
x, | |||||
y, | |||||
z, | |||||
i | ) | z+=( w^x ^y) +blk (i)+0xCA62C1D6+rol(v,5);w=rol(w,30); |
void av_sha1_update | ( | AVSHA1 * | ctx, | |
const uint8_t * | data, | |||
unsigned int | len | |||
) |
static void transform | ( | uint32_t | state[5], | |
const uint8_t | buffer[64] | |||
) | [static] |
const int av_sha1_size = sizeof(AVSHA1) |