Faster look-up for spec by algo for digests, ciphers and MAC
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 10 Apr 2018 19:03:49 +0000 (22:03 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 10 Apr 2018 19:03:49 +0000 (22:03 +0300)
commit634a85412a4073aa1890589ce5e97eac7b0f3ca3
tree0a938d0c3fe2e3285e187696dfa33bbef5aa57d2
parent35b59d0ea52e8a1c30c43554dc4dbca97da4bf87
Faster look-up for spec by algo for digests, ciphers and MAC

* cipher/cipher.c (cipher_list_algo0, cipher_list_algo301): New cipher
spec lists with same order and spacing as 'gcry_cipher_algos'
enumeration.
(spec_from_algo): Use new spec lists for faster look-up.
* cipher/mac.c (mac_list_algo101, mac_list_algo201, mac_list_algo401)
(mac_list_algo501): New MAC spec lists with same order and spacing as
'gcry_mac_algos' enumeration.
(spec_from_algo): Use new spec lists for faster look-up.
* cipher/md.c (digest_list_algo0, digest_list_algo301): New digest
spec lists with same order and spacing as 'gcry_md_algos'
enumeration.
(spec_from_algo): Use new spec lists for faster look-up.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/cipher.c
cipher/mac.c
cipher/md.c