Lines Matching refs:digest
94 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_alg_name() local
96 return digest == NULL ? NULL : digest->name; in ssh_digest_alg_name()
102 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_bytes() local
104 return digest == NULL ? 0 : digest->digest_len; in ssh_digest_bytes()
116 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_start() local
119 if (digest == NULL || ((ret = calloc(1, sizeof(*ret))) == NULL)) in ssh_digest_start()
126 if (EVP_DigestInit_ex(ret->mdctx, digest->mdfunc(), NULL) != 1) { in ssh_digest_start()
161 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_final() local
164 if (digest == NULL || dlen > UINT_MAX) in ssh_digest_final()
166 if (dlen < digest->digest_len) /* No truncation allowed */ in ssh_digest_final()
170 if (l != digest->digest_len) /* sanity */ in ssh_digest_final()
187 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_memory() local
190 if (digest == NULL) in ssh_digest_memory()
194 if (dlen < digest->digest_len) in ssh_digest_memory()
197 if (!EVP_Digest(m, mlen, d, &mdlen, digest->mdfunc(), NULL)) in ssh_digest_memory()