mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-26 05:18:41 +00:00
Add ccm_init/free()
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user