Lines Matching defs:hash

341 	/* Need extra space for hash and counfounder */
701 * Get a SHA1 hash on the input data.
714 * Get an MD5 hash on the input data.
1573 hash_info_t *hash)
1606 (char *)hmacbuff, hash->hash_len);
1655 hash_info_t *hash)
1685 (char *)hmacbuff, hash->hash_len);
1746 hash_info_t *hash)
1776 * at the head of the mblk for the confounder and hash info.
1784 cipherlen = inlen - hash->hash_len;
1852 (char *)mp->b_rptr, hash->hash_len,
1901 v1.iov_base = (char *)mp->b_rptr + hash->hash_len;
1928 (char *)mp->b_rptr + hash->hash_len, cipherlen,
1929 (char *)cksum, hash->hash_len);
1938 if (bcmp(cksum, mp->b_rptr, hash->hash_len) != 0) {
1946 * hash and confounder.
1948 mp->b_rptr += hash->hash_len + hash->confound_len;
1979 hash_info_t *hash)
2012 * at the head of the mblk for the confounder and hash info.
2022 * the confounder and hash.
2024 mp->b_rptr -= (hash->confound_len + hash->hash_len);
2026 /* zero out the hash area */
2027 bzero(mp->b_rptr, (size_t)hash->hash_len);
2078 (uint8_t *)(mp->b_rptr + hash->hash_len),
2079 (size_t)hash->confound_len);
2086 * This writes the HMAC to the hash area in the
2093 (char *)mp->b_rptr + hash->hash_len,
2094 hash->confound_len + inlen,
2095 (char *)mp->b_rptr, hash->hash_len);
2128 (char *)mp->b_rptr, hash->hash_len,
2170 v1.iov_base = (char *)mp->b_rptr + hash->hash_len;
2171 v1.iov_len = hash->confound_len + inlen;
2175 indata.cd_length = hash->confound_len + inlen;
2227 * The cksum depends on the hash being used.
2235 des_cbc_encrypt(queue_t *q, struct tmodinfo *tmi, mblk_t *mp, hash_info_t *hash)
2246 * at the head of the mblk for the confounder and hash info.
2264 * the confounder and hash.
2267 mp->b_rptr -= hash->confound_len;
2269 mp->b_rptr -= (hash->confound_len + hash->hash_len);
2271 /* zero out the hash area */
2272 bzero(mp->b_rptr + hash->confound_len, (size_t)hash->hash_len);
2276 if (hash->confound_len > 0) {
2278 (size_t)hash->confound_len);
2286 if (hash->hash_len > 0 && hash->hashfunc != NULL) {
2289 result = hash->hashfunc(cksum, mp->b_rptr,
2295 /* put hash in place right after the confounder */
2296 bcopy(cksum, (mp->b_rptr + hash->confound_len),
2297 (size_t)hash->hash_len);
2319 * The input length already included the hash size,
2323 plainlen = cipherlen - hash->hash_len;
2330 hash->hash_len);
2389 * The cksum depends on the hash being used.
2397 des_cbc_decrypt(queue_t *q, struct tmodinfo *tmi, mblk_t *mp, hash_info_t *hash)
2430 int decrypt_len = inlen - hash->hash_len;
2448 (char *)newcksum, hash->hash_len);
2485 if (hash->hash_len > 0) {
2487 bcopy(mp->b_rptr + inlen - hash->hash_len, cksum,
2488 hash->hash_len);
2490 bcopy(optr + hash->confound_len, cksum, hash->hash_len);
2493 ASSERT(optr + hash->confound_len + hash->hash_len <=
2495 bzero(optr + hash->confound_len, hash->hash_len);
2498 if (hash->hashfunc) {
2499 (void) hash->hashfunc(newcksum, optr, inlen);
2503 if (bcmp(cksum, newcksum, hash->hash_len)) {
2519 datalen = inlen - hash->confound_len - hash->hash_len;
2522 if (hash->confound_len > 0 || hash->hash_len > 0) {
2524 mp->b_rptr += hash->confound_len;
2526 mp->b_rptr += hash->confound_len + hash->hash_len;