mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
STM32: Add driver for STM32L162XX AES peripheral. Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
void up_cryptoinitialize(void)
|
||||
int up_cryptoinitialize(void)
|
||||
{
|
||||
#if defined(CONFIG_CRYPTO_AES) || defined(CONFIG_CRYPTO_ALGTEST)
|
||||
int res;
|
||||
|
||||
@@ -63,6 +63,16 @@
|
||||
static int do_test_aes(FAR struct cipher_testvec* test, int mode, int encrypt)
|
||||
{
|
||||
FAR void *out = kmm_zalloc(test->rlen);
|
||||
|
||||
#ifdef CONFIG_STM32_STM32L15XX
|
||||
/* This architecture only has 128-bit AES in chip. */
|
||||
|
||||
if (test->klen != 16)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
int res = aes_cypher(out, test->input, test->ilen, test->iv, test->key,
|
||||
test->klen, mode, encrypt);
|
||||
if (res == OK)
|
||||
|
||||
Reference in New Issue
Block a user