aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/transforms
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-28 15:20:51 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-28 15:20:51 +0000
commitb9d9f18874d2cf4de3c9cffeaac716df71a31e99 (patch)
tree648efac49c2eae47d6344f224d74a651d11b73dd /Source/charon/transforms
parent61068e9152c93365887d7b137c49e34ecb05cc29 (diff)
downloadstrongswan-b9d9f18874d2cf4de3c9cffeaac716df71a31e99.tar.bz2
strongswan-b9d9f18874d2cf4de3c9cffeaac716df71a31e99.tar.xz
- added compution of all needed keys and also creation of needed
transform objects
Diffstat (limited to 'Source/charon/transforms')
-rw-r--r--Source/charon/transforms/crypters/crypter.c17
-rw-r--r--Source/charon/transforms/crypters/crypter.h3
2 files changed, 19 insertions, 1 deletions
diff --git a/Source/charon/transforms/crypters/crypter.c b/Source/charon/transforms/crypters/crypter.c
index 8a9f590d3..1a0f859eb 100644
--- a/Source/charon/transforms/crypters/crypter.c
+++ b/Source/charon/transforms/crypters/crypter.c
@@ -45,3 +45,20 @@ mapping_t encryption_algorithm_m[] = {
{ENCR_AES_CTR, "ENCR_AES_CTR"},
{MAPPING_END, NULL}
};
+
+/*
+ * Described in header.
+ */
+crypter_t *crypter_create(encryption_algorithm_t encryption_algorithm,size_t blocksize)
+{
+ switch (encryption_algorithm)
+ {
+ case ENCR_AES_CBC:
+ {
+ return (crypter_t*)aes_cbc_crypter_create(blocksize);
+
+ }
+ default:
+ return NULL;
+ }
+}
diff --git a/Source/charon/transforms/crypters/crypter.h b/Source/charon/transforms/crypters/crypter.h
index 1d2b2b35c..878ea5ef4 100644
--- a/Source/charon/transforms/crypters/crypter.h
+++ b/Source/charon/transforms/crypters/crypter.h
@@ -118,10 +118,11 @@ struct crypter_t {
* @brief Generic constructor for crypter_t objects.
*
* @param encryption_algorithm Algorithm to use for crypter
+ * @param blocksize block size in bytes
* @return
* - crypter_t if successfully
* - NULL if out of ressources or crypter not supported
*/
-crypter_t *crypter_create(encryption_algorithm_t encryption_algorithm);
+crypter_t *crypter_create(encryption_algorithm_t encryption_algorithm, size_t blocksize);
#endif /*CRYPTER_H_*/