mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-06 12:26:40 +00:00
Split mbedtls_gcm_init() -> gcm_setkey()
This commit is contained in:
@@ -332,7 +332,7 @@ static const mbedtls_cipher_info_t aes_256_ctr_info = {
|
||||
static int gcm_aes_setkey_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return mbedtls_gcm_init( (mbedtls_gcm_context *) ctx, MBEDTLS_CIPHER_ID_AES,
|
||||
return mbedtls_gcm_setkey( (mbedtls_gcm_context *) ctx, MBEDTLS_CIPHER_ID_AES,
|
||||
key, key_length );
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ static const mbedtls_cipher_info_t camellia_256_ctr_info = {
|
||||
static int gcm_camellia_setkey_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return mbedtls_gcm_init( (mbedtls_gcm_context *) ctx, MBEDTLS_CIPHER_ID_CAMELLIA,
|
||||
return mbedtls_gcm_setkey( (mbedtls_gcm_context *) ctx, MBEDTLS_CIPHER_ID_CAMELLIA,
|
||||
key, key_length );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user