diff options
Diffstat (limited to 'src/libstrongswan/crypto/prfs/prf.c')
-rw-r--r-- | src/libstrongswan/crypto/prfs/prf.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/libstrongswan/crypto/prfs/prf.c b/src/libstrongswan/crypto/prfs/prf.c index 31b220a84..aa5d1d2b7 100644 --- a/src/libstrongswan/crypto/prfs/prf.c +++ b/src/libstrongswan/crypto/prfs/prf.c @@ -27,18 +27,14 @@ #include <crypto/hashers/hasher.h> #include <crypto/prfs/hmac_prf.h> - -/** - * String mappings for encryption_algorithm_t. - */ -mapping_t pseudo_random_function_m[] = { - {PRF_UNDEFINED, "PRF_UNDEFINED"}, - {PRF_HMAC_MD5, "PRF_HMAC_MD5"}, - {PRF_HMAC_SHA1, "PRF_HMAC_SHA1"}, - {PRF_HMAC_TIGER, "PRF_HMAC_TIGER"}, - {PRF_AES128_CBC, "PRF_AES128_CBC"}, - {MAPPING_END, NULL} -}; +ENUM_BEGIN(pseudo_random_function_names, PRF_UNDEFINED, PRF_UNDEFINED, + "PRF_UNDEFINED"); +ENUM_NEXT(pseudo_random_function_names, PRF_HMAC_MD5, PRF_AES128_CBC, PRF_UNDEFINED, + "PRF_HMAC_MD5", + "PRF_HMAC_SHA1", + "PRF_HMAC_TIGER", + "PRF_AES128_CBC"); +ENUM_END(pseudo_random_function_names, PRF_AES128_CBC); /* * Described in header. |