mirror of
				https://github.com/Mbed-TLS/mbedtls.git
				synced 2025-11-03 20:33:16 +03:00 
			
		
		
		
	Split mbedtls_gcm_init() -> gcm_setkey()
This commit is contained in:
		@@ -54,6 +54,15 @@ typedef struct {
 | 
			
		||||
}
 | 
			
		||||
mbedtls_gcm_context;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief           Initialize GCM context (just makes references valid)
 | 
			
		||||
 *                  Makes the context ready for mbedtls_gcm_setkey() or
 | 
			
		||||
 *                  mbedtls_gcm_free().
 | 
			
		||||
 *
 | 
			
		||||
 * \param ctx       GCM context to initialize
 | 
			
		||||
 */
 | 
			
		||||
void mbedtls_gcm_init( mbedtls_gcm_context *ctx );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief           GCM initialization (encryption)
 | 
			
		||||
 *
 | 
			
		||||
@@ -64,8 +73,10 @@ mbedtls_gcm_context;
 | 
			
		||||
 *
 | 
			
		||||
 * \return          0 if successful, or a cipher specific error code
 | 
			
		||||
 */
 | 
			
		||||
int mbedtls_gcm_init( mbedtls_gcm_context *ctx, mbedtls_cipher_id_t cipher, const unsigned char *key,
 | 
			
		||||
              unsigned int keysize );
 | 
			
		||||
int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx,
 | 
			
		||||
                        mbedtls_cipher_id_t cipher,
 | 
			
		||||
                        const unsigned char *key,
 | 
			
		||||
                        unsigned int keysize );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief           GCM buffer encryption/decryption using a block cipher
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user