mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Add ccm_init/free()
This commit is contained in:
parent
a6916fada8
commit
9fe0d13e8d
4 changed files with 100 additions and 0 deletions
|
|
@ -13,3 +13,20 @@ void ccm_self_test( )
|
|||
TEST_ASSERT( ccm_self_test( 0 ) == 0 );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void ccm_init( int cipher_id, int key_size, int result )
|
||||
{
|
||||
ccm_context ctx;
|
||||
unsigned char key[32];
|
||||
int ret;
|
||||
|
||||
memset( key, 0x2A, sizeof( key ) );
|
||||
TEST_ASSERT( (unsigned) key_size <= 8 * sizeof( key ) );
|
||||
|
||||
ret = ccm_init( &ctx, cipher_id, key, key_size );
|
||||
TEST_ASSERT( ret == result );
|
||||
|
||||
ccm_free( &ctx );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue