Files
wolfssl/doc/dox_comments/header_files/md4.h
T

93 lines
2.0 KiB
C
Raw Normal View History

/*!
\ingroup MD4
2018-06-27 16:22:12 -06:00
\brief This function initializes md4. This is automatically
called by wc_Md4Hash.
2018-06-27 16:22:12 -06:00
\return 0 Returned upon successfully initializing
\return BAD_FUNC_ARG Returned if md4 is NULL
2018-06-27 16:22:12 -06:00
\param md4 pointer to the md4 structure to use for encryption
2018-06-27 16:22:12 -06:00
_Example_
\code
md4 md4[1];
if ((ret = wc_InitMd4(md4)) != 0) {
WOLFSSL_MSG("wc_Initmd4 failed");
}
else {
wc_Md4Update(md4, data, len);
wc_Md4Final(md4, hash);
}
\endcode
2018-06-27 16:22:12 -06:00
\sa wc_Md4Hash
\sa wc_Md4Update
\sa wc_Md4Final
*/
2026-05-11 16:19:14 -06:00
int wc_InitMd4(wc_Md4* md4);
/*!
\ingroup MD4
2018-06-27 16:22:12 -06:00
\brief Can be called to continually hash the provided byte array
of length len.
2018-06-27 16:22:12 -06:00
\return 0 Returned upon successfully adding the data to the digest.
\return BAD_FUNC_ARG Returned if md4 is NULL, or if data is NULL and
len is non-zero
2018-06-27 16:22:12 -06:00
\param md4 pointer to the md4 structure to use for encryption
\param data the data to be hashed
\param len length of data to be hashed
2018-06-27 16:22:12 -06:00
_Example_
\code
md4 md4[1];
byte data[] = { }; // Data to be hashed
word32 len = sizeof(data);
if ((ret = wc_InitMd4(md4)) != 0) {
WOLFSSL_MSG("wc_Initmd4 failed");
}
else {
wc_Md4Update(md4, data, len);
wc_Md4Final(md4, hash);
}
\endcode
\sa wc_Md4Hash
\sa wc_Md4Final
\sa wc_InitMd4
*/
2026-05-11 16:19:14 -06:00
int wc_Md4Update(wc_Md4* md4, const byte* data, word32 len);
/*!
\ingroup MD4
2018-06-27 16:22:12 -06:00
\brief Finalizes hashing of data. Result is placed into hash.
2018-06-27 16:22:12 -06:00
\return 0 Returned upon successfully finalizing.
\return BAD_FUNC_ARG Returned if md4 or hash is NULL
2018-06-27 16:22:12 -06:00
\param md4 pointer to the md4 structure to use for encryption
\param hash Byte array to hold hash value.
_Example_
\code
md4 md4[1];
if ((ret = wc_InitMd4(md4)) != 0) {
WOLFSSL_MSG("wc_Initmd4 failed");
}
else {
wc_Md4Update(md4, data, len);
wc_Md4Final(md4, hash);
}
\endcode
\sa wc_Md4Hash
\sa wc_Md4Final
\sa wc_InitMd4
*/
2026-05-11 16:19:14 -06:00
int wc_Md4Final(wc_Md4* md4, byte* hash);