mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Add _init() and _free() for cipher modules
This commit is contained in:
@ -73,6 +73,20 @@ typedef struct
|
||||
}
|
||||
aes_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize AES context
|
||||
*
|
||||
* \param ctx AES context to be initialized
|
||||
*/
|
||||
void aes_init( aes_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear AES context
|
||||
*
|
||||
* \param ctx AES context to be cleared
|
||||
*/
|
||||
void aes_free( aes_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief AES key schedule (encryption)
|
||||
*
|
||||
|
@ -55,9 +55,23 @@ typedef struct
|
||||
arc4_context;
|
||||
|
||||
/**
|
||||
* \brief ARC4 key schedule
|
||||
* \brief Initialize ARC4 context
|
||||
*
|
||||
* \param ctx ARC4 context to be initialized
|
||||
*/
|
||||
void arc4_init( arc4_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear ARC4 context
|
||||
*
|
||||
* \param ctx ARC4 context to be cleared
|
||||
*/
|
||||
void arc4_free( arc4_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief ARC4 key schedule
|
||||
*
|
||||
* \param ctx ARC4 context to be setup
|
||||
* \param key the secret key
|
||||
* \param keylen length of the key, in bytes
|
||||
*/
|
||||
|
@ -70,6 +70,20 @@ typedef struct
|
||||
}
|
||||
blowfish_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize Blowfish context
|
||||
*
|
||||
* \param ctx Blowfish context to be initialized
|
||||
*/
|
||||
void blowfish_init( blowfish_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear Blowfish context
|
||||
*
|
||||
* \param ctx Blowfish context to be cleared
|
||||
*/
|
||||
void blowfish_free( blowfish_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Blowfish key schedule
|
||||
*
|
||||
|
@ -66,6 +66,20 @@ typedef struct
|
||||
}
|
||||
camellia_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize CAMELLIA context
|
||||
*
|
||||
* \param ctx CAMELLIA context to be initialized
|
||||
*/
|
||||
void camellia_init( camellia_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear CAMELLIA context
|
||||
*
|
||||
* \param ctx CAMELLIA context to be cleared
|
||||
*/
|
||||
void camellia_free( camellia_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief CAMELLIA key schedule (encryption)
|
||||
*
|
||||
|
@ -77,6 +77,34 @@ typedef struct
|
||||
}
|
||||
des3_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize DES context
|
||||
*
|
||||
* \param ctx DES context to be initialized
|
||||
*/
|
||||
void des_init( des_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear DES context
|
||||
*
|
||||
* \param ctx DES context to be cleared
|
||||
*/
|
||||
void des_free( des_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Initialize Triple-DES context
|
||||
*
|
||||
* \param ctx DES3 context to be initialized
|
||||
*/
|
||||
void des3_init( des3_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear Triple-DES context
|
||||
*
|
||||
* \param ctx DES3 context to be cleared
|
||||
*/
|
||||
void des3_free( des3_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Set key parity on the given key to odd.
|
||||
*
|
||||
|
@ -64,6 +64,20 @@ typedef struct
|
||||
}
|
||||
xtea_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize XTEA context
|
||||
*
|
||||
* \param ctx XTEA context to be initialized
|
||||
*/
|
||||
void xtea_init( xtea_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear XTEA context
|
||||
*
|
||||
* \param ctx XTEA context to be cleared
|
||||
*/
|
||||
void xtea_free( xtea_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief XTEA key schedule
|
||||
*
|
||||
|
Reference in New Issue
Block a user