Faster look-up for spec by algo for digests, ciphers and MAC

Authored by jukivili on Apr 10 2018, 9:03 PM.

Description

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>

Details

Committed
jukiviliApr 10 2018, 9:03 PM
Parents
rC35b59d0ea52e: Fix building with BLAKE2 disabled
Branches
Unknown
Tags
Unknown