• Home
  • Raw
  • Download

Lines Matching refs:alg

48 	int alg;  member
118 ssh_digest_by_alg(int alg) in ssh_digest_by_alg() argument
120 if (alg < 0 || alg >= SSH_DIGEST_MAX) in ssh_digest_by_alg()
122 if (digests[alg].id != alg) /* sanity */ in ssh_digest_by_alg()
124 return &(digests[alg]); in ssh_digest_by_alg()
130 int alg; in ssh_digest_alg_by_name() local
132 for (alg = 0; alg < SSH_DIGEST_MAX; alg++) { in ssh_digest_alg_by_name()
133 if (strcasecmp(name, digests[alg].name) == 0) in ssh_digest_alg_by_name()
134 return digests[alg].id; in ssh_digest_alg_by_name()
140 ssh_digest_alg_name(int alg) in ssh_digest_alg_name() argument
142 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_alg_name()
148 ssh_digest_bytes(int alg) in ssh_digest_bytes() argument
150 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_bytes()
158 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_blocksize()
164 ssh_digest_start(int alg) in ssh_digest_start() argument
166 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_start()
175 ret->alg = alg; in ssh_digest_start()
183 const struct ssh_digest *digest = ssh_digest_by_alg(from->alg); in ssh_digest_copy_state()
185 if (digest == NULL || from->alg != to->alg) in ssh_digest_copy_state()
194 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_update()
211 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_final()
229 digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_free()
239 ssh_digest_memory(int alg, const void *m, size_t mlen, u_char *d, size_t dlen) in ssh_digest_memory() argument
241 struct ssh_digest_ctx *ctx = ssh_digest_start(alg); in ssh_digest_memory()
253 ssh_digest_buffer(int alg, const struct sshbuf *b, u_char *d, size_t dlen) in ssh_digest_buffer() argument
255 return ssh_digest_memory(alg, sshbuf_ptr(b), sshbuf_len(b), d, dlen); in ssh_digest_buffer()