• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/Security-57031.1.35/Security/libsecurity_ssl/security_ssl/

Lines Matching refs:digest

40 	const HashReference         *digest;
56 const HashReference *digest;
65 digest = &SSLHashSHA384;
69 digest = &SSLHashSHA256;
73 digest = &SSLHashSHA1;
77 digest = &SSLHashMD5;
86 3 * digest->contextSize);
92 href->digest = digest;
94 href->outerHashCtx.length = digest->contextSize;
95 href->innerHashCtx.data = href->outerHashCtx.data + digest->contextSize;
96 href->innerHashCtx.length = digest->contextSize;
97 href->currentHashCtx.data = href->innerHashCtx.data + digest->contextSize;
98 href->currentHashCtx.length = digest->contextSize;
100 digest->init(&href->outerHashCtx);
101 digest->init(&href->innerHashCtx);
103 uint8_t tmpkey[digest->digestSize];
107 /* If the key is longer than digest_block_size, reset it to key=digest(key) */
112 SSLBuffer outBuffer = { digest->digestSize, tmpkey };
113 digest->update(&href->innerHashCtx, &keyBuffer);
114 digest->final(&href->innerHashCtx, &outBuffer);
118 digest->init(&href->innerHashCtx);
125 digest->update(&href->outerHashCtx, &kpad);
131 digest->update(&href->innerHashCtx, &kpad);
136 /* Now clone the inner digest so we are ready to receive an update. */
138 digest->clone(&href->innerHashCtx, &href->currentHashCtx);
150 hmacCtx->digest->close(&hmacCtx->outerHashCtx);
151 hmacCtx->digest->close(&hmacCtx->innerHashCtx);
152 hmacCtx->digest->close(&hmacCtx->currentHashCtx);
154 /* Clear out any key material left in the digest contexts. */
173 check(hmacCtx->digest != NULL);
175 hmacCtx->digest->close(&hmacCtx->currentHashCtx);
176 hmacCtx->digest->clone(&hmacCtx->innerHashCtx, &hmacCtx->currentHashCtx);
193 check(hmacCtx->digest != NULL);
195 hmacCtx->digest->update(&hmacCtx->currentHashCtx, &cdata);
206 SSLBuffer digest = { TLS_HMAC_MAX_SIZE, bytes };
217 check(hmacCtx->digest != NULL);
218 check(*hmacLen >= hmacCtx->digest->digestSize);
223 hmacCtx->digest->final(&hmacCtx->currentHashCtx, &digest);
224 hmacCtx->digest->clone(&hmacCtx->outerHashCtx, &hmacCtx->currentHashCtx);
225 hmacCtx->digest->update(&hmacCtx->currentHashCtx, &digest);
226 bzero(bytes, hmacCtx->digest->digestSize);
227 hmacCtx->digest->final(&hmacCtx->currentHashCtx, &cdata);
228 *hmacLen = hmacCtx->digest->digestSize;