Functions
Algorithms - MD4

Functions

WOLFSSL_API void wc_InitMd4 (Md4 *)
 This function initializes md4. This is automatically called by wc_Md4Hash. More...
 
WOLFSSL_API void wc_Md4Update (Md4 *, const byte *, word32)
 Can be called to continually hash the provided byte array of length len. More...
 
WOLFSSL_API void wc_Md4Final (Md4 *, byte *)
 Finalizes hashing of data. Result is placed into hash. More...
 

Detailed Description

Function Documentation

◆ wc_InitMd4()

WOLFSSL_API void wc_InitMd4 ( Md4 )

This function initializes md4. This is automatically called by wc_Md4Hash.

Returns
0 Returned upon successfully initializing
Parameters
md4pointer to the md4 structure to use for encryption

Example

md4 md4[1];
if ((ret = wc_InitMd4(md4)) != 0) {
WOLFSSL_MSG("wc_Initmd4 failed");
}
else {
wc_Md4Update(md4, data, len);
wc_Md4Final(md4, hash);
}
See also
wc_Md4Hash
wc_Md4Update
wc_Md4Final

◆ wc_Md4Final()

WOLFSSL_API void wc_Md4Final ( Md4 ,
byte *   
)

Finalizes hashing of data. Result is placed into hash.

Returns
0 Returned upon successfully finalizing.
Parameters
md4pointer to the md4 structure to use for encryption
hashByte array to hold hash value.

Example

md4 md4[1];
if ((ret = wc_InitMd4(md4)) != 0) {
WOLFSSL_MSG("wc_Initmd4 failed");
}
else {
wc_Md4Update(md4, data, len);
wc_Md4Final(md4, hash);
}
See also
wc_Md4Hash
wc_Md4Final
wc_InitMd4

◆ wc_Md4Update()

WOLFSSL_API void wc_Md4Update ( Md4 ,
const byte *  ,
word32   
)

Can be called to continually hash the provided byte array of length len.

Returns
0 Returned upon successfully adding the data to the digest.
Parameters
md4pointer to the md4 structure to use for encryption
datathe data to be hashed
lenlength of data to be hashed

Example

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);
}
See also
wc_Md4Hash
wc_Md4Final
wc_InitMd4