- added compution of all needed keys and also creation of needed
transform objects
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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_*/
|
||||
|
||||
Reference in New Issue
Block a user