mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
Add options support for setting and getting HMAC algorithms
BUG: https://red.libssh.org/issues/91 Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
262c82ac06
commit
6c74d6f891
@@ -78,6 +78,16 @@ size_t hmac_digest_len(enum ssh_hmac_e type) {
|
||||
}
|
||||
}
|
||||
|
||||
const char *ssh_hmac_type_to_string(enum ssh_hmac_e hmac_type)
|
||||
{
|
||||
int i = 0;
|
||||
struct ssh_hmac_struct *ssh_hmactab = ssh_get_hmactab();
|
||||
while (ssh_hmactab[i].name && (ssh_hmactab[i].hmac_type != hmac_type)) {
|
||||
i++;
|
||||
}
|
||||
return ssh_hmactab[i].name;
|
||||
}
|
||||
|
||||
/* it allocates a new cipher structure based on its offset into the global table */
|
||||
static struct ssh_cipher_struct *cipher_new(int offset) {
|
||||
struct ssh_cipher_struct *cipher = NULL;
|
||||
|
||||
Reference in New Issue
Block a user