diff options
author | Martin Willi <martin@revosec.ch> | 2012-07-17 15:35:02 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-07-17 17:31:55 +0200 |
commit | 4b9600083310556c37ed9fe550417bbd057b727c (patch) | |
tree | 03a235bc799bec183ef2c8e2bb0a60eea1b19cd1 | |
parent | 20ec024a94ad4dfec07e8220931b1955aee39fa4 (diff) | |
download | strongswan-4b9600083310556c37ed9fe550417bbd057b727c.tar.bz2 strongswan-4b9600083310556c37ed9fe550417bbd057b727c.tar.xz |
Add short names for hasher algorithms
-rw-r--r-- | src/libstrongswan/crypto/hashers/hasher.c | 13 | ||||
-rw-r--r-- | src/libstrongswan/crypto/hashers/hasher.h | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/libstrongswan/crypto/hashers/hasher.c b/src/libstrongswan/crypto/hashers/hasher.c index e0a4995cf..dc73d5223 100644 --- a/src/libstrongswan/crypto/hashers/hasher.c +++ b/src/libstrongswan/crypto/hashers/hasher.c @@ -32,6 +32,19 @@ ENUM(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA512, "HASH_SHA512" ); +ENUM(hash_algorithm_short_names, HASH_UNKNOWN, HASH_SHA512, + "unknown", + "preferred", + "md2", + "md4", + "md5", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512" +); + /* * Described in header. */ diff --git a/src/libstrongswan/crypto/hashers/hasher.h b/src/libstrongswan/crypto/hashers/hasher.h index 2685d44a9..fa5ff69f1 100644 --- a/src/libstrongswan/crypto/hashers/hasher.h +++ b/src/libstrongswan/crypto/hashers/hasher.h @@ -64,6 +64,11 @@ enum hash_algorithm_t { extern enum_name_t *hash_algorithm_names; /** + * Short names for hash_algorithm_names + */ +extern enum_name_t *hash_algorithm_short_names; + +/** * Generic interface for all hash functions. */ struct hasher_t { |