Lines Matching defs:ctx
90 ssh_digest_blocksize(struct ssh_digest_ctx *ctx)
92 return EVP_MD_CTX_block_size(ctx->mdctx);
127 ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen)
129 if (EVP_DigestUpdate(ctx->mdctx, m, mlen) != 1)
135 ssh_digest_update_buffer(struct ssh_digest_ctx *ctx, const struct sshbuf *b)
137 return ssh_digest_update(ctx, sshbuf_ptr(b), sshbuf_len(b));
141 ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
143 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg);
150 if (EVP_DigestFinal_ex(ctx->mdctx, d, &l) != 1)
158 ssh_digest_free(struct ssh_digest_ctx *ctx)
160 if (ctx == NULL)
162 EVP_MD_CTX_free(ctx->mdctx);
163 freezero(ctx, sizeof(*ctx));