Lines Matching refs:digest

53 #define	PROV_SHA2_DIGEST_KEY(mech, ctx, key, len, digest) {	\  argument
56 SHA2Final(digest, ctx); \
209 sha2_digest_final_uio(SHA2_CTX *sha2_ctx, crypto_data_t *digest, in sha2_digest_final_uio() argument
212 off_t offset = digest->cd_offset; in sha2_digest_final_uio()
216 if (zfs_uio_segflg(digest->cd_uio) != UIO_SYSSPACE) in sha2_digest_final_uio()
223 offset = zfs_uio_index_at_offset(digest->cd_uio, offset, &vec_idx); in sha2_digest_final_uio()
224 if (vec_idx == zfs_uio_iovcnt(digest->cd_uio)) { in sha2_digest_final_uio()
234 zfs_uio_iovlen(digest->cd_uio, vec_idx)) { in sha2_digest_final_uio()
249 zfs_uio_iovbase(digest->cd_uio, vec_idx) + offset, in sha2_digest_final_uio()
252 SHA2Final((uchar_t *)zfs_uio_iovbase(digest-> in sha2_digest_final_uio()
271 while (vec_idx < zfs_uio_iovcnt(digest->cd_uio) && length > 0) { in sha2_digest_final_uio()
273 MIN(zfs_uio_iovlen(digest->cd_uio, vec_idx) - in sha2_digest_final_uio()
276 zfs_uio_iovbase(digest->cd_uio, vec_idx) + offset, in sha2_digest_final_uio()
286 if (vec_idx == zfs_uio_iovcnt(digest->cd_uio) && length > 0) { in sha2_digest_final_uio()
460 uchar_t digest[SHA512_DIGEST_LENGTH]; in sha2_mac_final() local
486 SHA2Final(digest, &PROV_SHA2_HMAC_CTX(ctx)->hc_icontext); in sha2_mac_final()
492 SHA2Update(&PROV_SHA2_HMAC_CTX(ctx)->hc_ocontext, digest, in sha2_mac_final()
507 SHA2Final(digest, in sha2_mac_final()
510 mac->cd_offset, digest, digest_len); in sha2_mac_final()
520 digest_len, digest); in sha2_mac_final()
559 uchar_t digest[SHA512_DIGEST_LENGTH]; in sha2_mac_atomic() local
591 key->ck_data, keylen_in_bytes, digest); in sha2_mac_atomic()
592 sha2_mac_init_ctx(&sha2_hmac_ctx, digest, in sha2_mac_atomic()
609 SHA2Final(digest, &sha2_hmac_ctx.hc_icontext); in sha2_mac_atomic()
616 SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); in sha2_mac_atomic()
630 SHA2Final(digest, &sha2_hmac_ctx.hc_ocontext); in sha2_mac_atomic()
632 mac->cd_offset, digest, digest_len); in sha2_mac_atomic()
640 digest_len, digest); in sha2_mac_atomic()
662 uchar_t digest[SHA512_DIGEST_LENGTH]; in sha2_mac_verify_atomic() local
694 key->ck_data, keylen_in_bytes, digest); in sha2_mac_verify_atomic()
695 sha2_mac_init_ctx(&sha2_hmac_ctx, digest, in sha2_mac_verify_atomic()
715 SHA2Final(digest, &sha2_hmac_ctx.hc_icontext); in sha2_mac_verify_atomic()
722 SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); in sha2_mac_verify_atomic()
728 SHA2Final(digest, &sha2_hmac_ctx.hc_ocontext); in sha2_mac_verify_atomic()
738 if (memcmp(digest, (unsigned char *)mac->cd_raw.iov_base + in sha2_mac_verify_atomic()
771 if (memcmp(digest + scratch_offset, in sha2_mac_verify_atomic()