diff options
author | Martin Willi <martin@strongswan.org> | 2009-06-04 17:06:43 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-06-09 11:18:56 +0200 |
commit | 80862c463719ac73bbb0e8bd17f5348d3f07dafb (patch) | |
tree | 1902ab48be95ff2542282633d83c93e716115fe9 /src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c | |
parent | f908ff9f910dee0ae727a9406025d603d63bad71 (diff) | |
download | strongswan-80862c463719ac73bbb0e8bd17f5348d3f07dafb.tar.bz2 strongswan-80862c463719ac73bbb0e8bd17f5348d3f07dafb.tar.xz |
gcrypt crypter implementation
Diffstat (limited to 'src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c index 062e890c8..5568de8d4 100644 --- a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c +++ b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c @@ -16,6 +16,7 @@ #include "gcrypt_plugin.h" #include "gcrypt_hasher.h" +#include "gcrypt_crypter.h" #include <library.h> #include <debug.h> @@ -49,6 +50,8 @@ static void destroy(private_gcrypt_plugin_t *this) { lib->crypto->remove_hasher(lib->crypto, (hasher_constructor_t)gcrypt_hasher_create); + lib->crypto->remove_crypter(lib->crypto, + (crypter_constructor_t)gcrypt_crypter_create); free(this); } @@ -91,6 +94,28 @@ plugin_t *plugin_create() lib->crypto->add_hasher(lib->crypto, HASH_SHA512, (hasher_constructor_t)gcrypt_hasher_create); + /* crypters */ + lib->crypto->add_crypter(lib->crypto, ENCR_3DES, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_IDEA, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_CAST, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_BLOWFISH, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_DES, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_DES_ECB, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_AES_CBC, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_CAMELLIA_CBC, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_SERPENT_CBC, + (crypter_constructor_t)gcrypt_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_TWOFISH_CBC, + (crypter_constructor_t)gcrypt_crypter_create); + return &this->public.plugin; } |