Lines Matching refs:digest
33 struct ssh_digest_ctx *digest; member
54 (ret->digest = ssh_digest_start(alg)) == NULL) in ssh_hmac_start()
89 if (ssh_digest_copy_state(ctx->ictx, ctx->digest) < 0) in ssh_hmac_init()
97 return ssh_digest_update(ctx->digest, m, mlen); in ssh_hmac_update()
103 return ssh_digest_update_buffer(ctx->digest, b); in ssh_hmac_update_buffer()
113 ssh_digest_final(ctx->digest, ctx->buf, len)) in ssh_hmac_final()
116 if (ssh_digest_copy_state(ctx->octx, ctx->digest) < 0 || in ssh_hmac_final()
117 ssh_digest_update(ctx->digest, ctx->buf, len) < 0 || in ssh_hmac_final()
118 ssh_digest_final(ctx->digest, d, dlen) < 0) in ssh_hmac_final()
129 ssh_digest_free(ctx->digest); in ssh_hmac_free()
146 u_char digest[16]; in hmac_test() local
152 ssh_hmac_final(ctx, digest, sizeof(digest)) < 0) in hmac_test()
156 if (memcmp(e, digest, elen)) { in hmac_test()
158 printf("[%zu] %2.2x %2.2x\n", i, e[i], digest[i]); in hmac_test()