# HG changeset patch # User kostya # Date 1247123647 0 # Node ID 79fdc3949d4dfca49c713288d986269cb3513852 # Parent 860d74503de2c4312fa08c3e835c02256d747014 Extend AVSHA1 so it can be used in future SHA-2 code as well diff -r 860d74503de2 -r 79fdc3949d4d sha1.c --- a/sha1.c Thu Jul 09 07:07:01 2009 +0000 +++ b/sha1.c Thu Jul 09 07:14:07 2009 +0000 @@ -25,9 +25,10 @@ /** hash context */ typedef struct AVSHA1 { + uint8_t digest_len; ///< digest length in 32-bit words uint64_t count; ///< number of bytes in buffer uint8_t buffer[64]; ///< 512-bit buffer of input values used in hash updating - uint32_t state[5]; ///< current hash value + uint32_t state[8]; ///< current hash value } AVSHA1; const int av_sha1_size = sizeof(AVSHA1);