botan: Support of AES-CFB encryption
This commit is contained in:
@@ -185,6 +185,26 @@ botan_crypter_t *botan_crypter_create(encryption_algorithm_t algo,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ENCR_AES_CFB:
|
||||||
|
switch (key_size)
|
||||||
|
{
|
||||||
|
case 16:
|
||||||
|
/* AES 128 */
|
||||||
|
this->cipher_name = "AES-128/CFB";
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
/* AES-192 */
|
||||||
|
this->cipher_name = "AES-192/CFB";
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
/* AES-256 */
|
||||||
|
this->cipher_name = "AES-256/CFB";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
free(this);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
free(this);
|
free(this);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -112,6 +112,11 @@ METHOD(plugin_t, get_features, int,
|
|||||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24),
|
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24),
|
||||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32),
|
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32),
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef BOTAN_HAS_MODE_CFB
|
||||||
|
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 16),
|
||||||
|
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 24),
|
||||||
|
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 32),
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user