mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Add _init() and _free() for hash modules
This commit is contained in:
parent
8cfd9d8c59
commit
5b4af39a36
19 changed files with 346 additions and 73 deletions
|
|
@ -60,6 +60,20 @@ typedef struct
|
|||
}
|
||||
md2_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize MD2 context
|
||||
*
|
||||
* \param ctx MD2 context to be initialized
|
||||
*/
|
||||
void md2_init( md2_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear MD2 context
|
||||
*
|
||||
* \param ctx MD2 context to be cleared
|
||||
*/
|
||||
void md2_free( md2_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief MD2 context setup
|
||||
*
|
||||
|
|
|
|||
|
|
@ -66,6 +66,20 @@ typedef struct
|
|||
}
|
||||
md4_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize MD4 context
|
||||
*
|
||||
* \param ctx MD4 context to be initialized
|
||||
*/
|
||||
void md4_init( md4_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear MD4 context
|
||||
*
|
||||
* \param ctx MD4 context to be cleared
|
||||
*/
|
||||
void md4_free( md4_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief MD4 context setup
|
||||
*
|
||||
|
|
|
|||
|
|
@ -66,6 +66,20 @@ typedef struct
|
|||
}
|
||||
md5_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize MD5 context
|
||||
*
|
||||
* \param ctx MD5 context to be initialized
|
||||
*/
|
||||
void md5_init( md5_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear MD5 context
|
||||
*
|
||||
* \param ctx MD5 context to be cleared
|
||||
*/
|
||||
void md5_free( md5_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief MD5 context setup
|
||||
*
|
||||
|
|
|
|||
|
|
@ -66,6 +66,20 @@ typedef struct
|
|||
}
|
||||
ripemd160_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize RIPEMD-160 context
|
||||
*
|
||||
* \param ctx RIPEMD-160 context to be initialized
|
||||
*/
|
||||
void ripemd160_init( ripemd160_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear RIPEMD-160 context
|
||||
*
|
||||
* \param ctx RIPEMD-160 context to be cleared
|
||||
*/
|
||||
void ripemd160_free( ripemd160_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief RIPEMD-160 context setup
|
||||
*
|
||||
|
|
|
|||
|
|
@ -66,6 +66,20 @@ typedef struct
|
|||
}
|
||||
sha1_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize SHA-1 context
|
||||
*
|
||||
* \param ctx SHA-1 context to be initialized
|
||||
*/
|
||||
void sha1_init( sha1_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear SHA-1 context
|
||||
*
|
||||
* \param ctx SHA-1 context to be cleared
|
||||
*/
|
||||
void sha1_free( sha1_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief SHA-1 context setup
|
||||
*
|
||||
|
|
|
|||
|
|
@ -67,6 +67,20 @@ typedef struct
|
|||
}
|
||||
sha256_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize SHA-256 context
|
||||
*
|
||||
* \param ctx SHA-256 context to be initialized
|
||||
*/
|
||||
void sha256_init( sha256_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear SHA-256 context
|
||||
*
|
||||
* \param ctx SHA-256 context to be cleared
|
||||
*/
|
||||
void sha256_free( sha256_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief SHA-256 context setup
|
||||
*
|
||||
|
|
|
|||
|
|
@ -68,6 +68,20 @@ typedef struct
|
|||
}
|
||||
sha512_context;
|
||||
|
||||
/**
|
||||
* \brief Initialize SHA-512 context
|
||||
*
|
||||
* \param ctx SHA-512 context to be initialized
|
||||
*/
|
||||
void sha512_init( sha512_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Clear SHA-512 context
|
||||
*
|
||||
* \param ctx SHA-512 context to be cleared
|
||||
*/
|
||||
void sha512_free( sha512_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief SHA-512 context setup
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue