Lines Matching refs:hash
50 stream->hash[0] = 0x67452301u; in deSha1Stream_init()
51 stream->hash[1] = 0xEFCDAB89u; in deSha1Stream_init()
52 stream->hash[2] = 0x98BADCFEu; in deSha1Stream_init()
53 stream->hash[3] = 0x10325476u; in deSha1Stream_init()
54 stream->hash[4] = 0xC3D2E1F0u; in deSha1Stream_init()
75 deUint32 a = stream->hash[0]; in deSha1Stream_flushChunk()
76 deUint32 b = stream->hash[1]; in deSha1Stream_flushChunk()
77 deUint32 c = stream->hash[2]; in deSha1Stream_flushChunk()
78 deUint32 d = stream->hash[3]; in deSha1Stream_flushChunk()
79 deUint32 e = stream->hash[4]; in deSha1Stream_flushChunk()
119 stream->hash[0] += a; in deSha1Stream_flushChunk()
120 stream->hash[1] += b; in deSha1Stream_flushChunk()
121 stream->hash[2] += c; in deSha1Stream_flushChunk()
122 stream->hash[3] += d; in deSha1Stream_flushChunk()
123 stream->hash[4] += e; in deSha1Stream_flushChunk()
155 void deSha1Stream_finalize (deSha1Stream* stream, deSha1* hash) in deSha1Stream_finalize() argument
181 deMemcpy(hash->hash, stream->hash, sizeof(hash->hash)); in deSha1Stream_finalize()
184 void deSha1_compute (deSha1* hash, size_t size, const void* data) in deSha1_compute() argument
190 deSha1Stream_finalize(&stream, hash); in deSha1_compute()
193 void deSha1_render (const deSha1* hash, char* buffer) in deSha1_render() argument
199 const deUint32 val32 = hash->hash[charNdx / 8]; in deSha1_render()
209 deBool deSha1_parse (deSha1* hash, const char* buffer) in deSha1_parse() argument
213 deMemset(hash->hash, 0, sizeof(hash->hash)); in deSha1_parse()
228 hash->hash[charNdx / 8] |= ((deUint32)val4) << (4 * (8u - 1u - (charNdx % 8u))); in deSha1_parse()
237 return deMemCmp(a->hash, b->hash, sizeof(b->hash)) == 0; in deSha1_equal()
267 const char* const hash; in deSha1_selfTest() member
287 deSha1 hash; in deSha1_selfTest() local
288 deMemset(&hash, garbage, sizeof(deSha1)); in deSha1_selfTest()
289 DE_TEST_ASSERT(deSha1_parse(&hash, validHashStrings[stringNdx])); in deSha1_selfTest()
299 deSha1 hash; in deSha1_selfTest() local
300 deMemset(&hash, garbage, sizeof(deSha1)); in deSha1_selfTest()
301 DE_TEST_ASSERT(!deSha1_parse(&hash, invalidHashStrings[stringNdx])); in deSha1_selfTest()
358 deSha1 hash; in deSha1_selfTest() local
360 deMemset(&hash, garbage, sizeof(hash)); in deSha1_selfTest()
363 DE_TEST_ASSERT(deSha1_parse(&hash, validHashStrings[stringNdx])); in deSha1_selfTest()
364 deSha1_render(&hash, result); in deSha1_selfTest()
380 DE_TEST_ASSERT(deSha1_parse(&reference, stringHashPairs[ndx].hash)); in deSha1_selfTest()
407 DE_TEST_ASSERT(deSha1_parse(&reference, stringHashPairs[ndx].hash)); in deSha1_selfTest()