Revision 36c7fa7e libavutil/sha1.c
libavutil/sha1.c | ||
---|---|---|
90 | 90 |
|
91 | 91 |
j = context->count & 63; |
92 | 92 |
context->count += len; |
93 |
#ifdef CONFIG_SMALL |
|
94 |
for( i = 0; i < len; i++ ){ |
|
95 |
context->buffer[ j++ ] = data[i]; |
|
96 |
if( 64 == j ){ |
|
97 |
transform(context->state, context->buffer); |
|
98 |
j = 0; |
|
99 |
} |
|
100 |
} |
|
101 |
#else |
|
93 | 102 |
if ((j + len) > 63) { |
94 | 103 |
memcpy(&context->buffer[j], data, (i = 64-j)); |
95 | 104 |
transform(context->state, context->buffer); |
... | ... | |
100 | 109 |
} |
101 | 110 |
else i = 0; |
102 | 111 |
memcpy(&context->buffer[j], &data[i], len - i); |
112 |
#endif |
|
103 | 113 |
} |
104 | 114 |
|
105 | 115 |
void av_sha1_final(AVSHA1* context, uint8_t digest[20]){ |
Also available in: Unified diff