|
int | wc_Md5Hash (const byte *data, word32 len, byte *hash) |
| Convenience function, handles all the hashing and places the result into hash. More...
|
|
int | wc_InitMd5 (wc_Md5 *) |
| This function initializes md5. This is automatically called by wc_Md5Hash. More...
|
|
int | wc_Md5Update (wc_Md5 *md5, const byte *data, word32 len) |
| Can be called to continually hash the provided byte array of length len. More...
|
|
int | wc_Md5Final (wc_Md5 *md5, byte *hash) |
| Finalizes hashing of data. Result is placed into hash. Md5 Struct is reset. Note: This function will also return the result of calling IntelQaSymMd5() in the case that HAVE_INTEL_QA is defined. More...
|
|
void | wc_Md5Free (wc_Md5 *) |
| Resets the Md5 structure. Note: this is only supported if you have WOLFSSL_TI_HASH defined. More...
|
|
int | wc_Md5GetHash (wc_Md5 *md5, byte *hash) |
| Gets hash data. Result is placed into hash. Md5 struct is not reset. More...
|
|
◆ wc_InitMd5()
int wc_InitMd5 |
( |
wc_Md5 * |
| ) |
|
This function initializes md5. This is automatically called by wc_Md5Hash.
- Returns
- 0 Returned upon successfully initializing.
-
BAD_FUNC_ARG Returned if the Md5 structure is passed as a NULL value.
- Parameters
-
md5 | pointer to the md5 structure to use for encryption |
Example
Md5 md5;
byte* hash;
WOLFSSL_MSG("wc_Initmd5 failed");
}
else {
if (ret != 0) {
}
if (ret != 0) {
}
}
- See also
- wc_Md5Hash
-
wc_Md5Update
-
wc_Md5Final
◆ wc_Md5Final()
int wc_Md5Final |
( |
wc_Md5 * |
md5, |
|
|
byte * |
hash |
|
) |
| |
Finalizes hashing of data. Result is placed into hash. Md5 Struct is reset. Note: This function will also return the result of calling IntelQaSymMd5() in the case that HAVE_INTEL_QA is defined.
- Returns
- 0 Returned upon successfully finalizing.
-
BAD_FUNC_ARG Returned if the Md5 structure or hash pointer is passed in NULL.
- Parameters
-
md5 | pointer to the md5 structure to use for encryption |
hash | Byte array to hold hash value. |
Example
md5 md5[1];
byte data[] = { Data to be hashed };
word32 len = sizeof(data);
WOLFSSL_MSG("wc_Initmd5 failed");
}
else {
if (ret != 0) {
}
if (ret != 0) {
}
}
- See also
- wc_Md5Hash
-
wc_InitMd5
-
wc_Md5GetHash
◆ wc_Md5Free()
void wc_Md5Free |
( |
wc_Md5 * |
| ) |
|
Resets the Md5 structure. Note: this is only supported if you have WOLFSSL_TI_HASH defined.
- Returns
- none No returns.
- Parameters
-
md5 | Pointer to the Md5 structure to be reset. |
Example
Md5 md5;
byte data[] = { Data to be hashed };
word32 len = sizeof(data);
WOLFSSL_MSG("wc_InitMd5 failed");
}
else {
}
- See also
- wc_InitMd5
-
wc_Md5Update
-
wc_Md5Final
◆ wc_Md5GetHash()
int wc_Md5GetHash |
( |
wc_Md5 * |
md5, |
|
|
byte * |
hash |
|
) |
| |
Gets hash data. Result is placed into hash. Md5 struct is not reset.
- Returns
- none No returns
- Parameters
-
md5 | pointer to the md5 structure to use for encryption. |
hash | Byte array to hold hash value. |
Example
md5 md5[1];
WOLFSSL_MSG("wc_Initmd5 failed");
}
else {
}
- See also
- wc_Md5Hash
-
wc_Md5Final
-
wc_InitMd5
◆ wc_Md5Hash()
int wc_Md5Hash |
( |
const byte * |
data, |
|
|
word32 |
len, |
|
|
byte * |
hash |
|
) |
| |
Convenience function, handles all the hashing and places the result into hash.
- Returns
- 0 Returned upon successfully hashing the data.
-
Memory_E memory error, unable to allocate memory. This is only possible with the small stack option enabled.
- Parameters
-
data | the data to hash |
len | the length of data |
hash | Byte array to hold hash value. |
Example
const byte* data;
word32 data_len;
byte* hash;
int ret;
...
if (ret != 0) {
}
- See also
- wc_Md5Hash
-
wc_Md5Final
-
wc_InitMd5
◆ wc_Md5Update()
int wc_Md5Update |
( |
wc_Md5 * |
md5, |
|
|
const byte * |
data, |
|
|
word32 |
len |
|
) |
| |
Can be called to continually hash the provided byte array of length len.
- Returns
- 0 Returned upon successfully adding the data to the digest.
-
BAD_FUNC_ARG Returned if the Md5 structure is NULL or if data is NULL and len is greater than zero. The function should not return an error if the data parameter is NULL and len is zero.
- Parameters
-
md5 | pointer to the md5 structure to use for encryption |
data | the data to be hashed |
len | length of data to be hashed |
Example
Md5 md5;
byte data[] = { Data to be hashed };
word32 len = sizeof(data);
WOLFSSL_MSG("wc_Initmd5 failed");
}
else {
if (ret != 0) {
}
if (ret != 0) {
}
}
- See also
- wc_Md5Hash
-
wc_Md5Final
-
wc_InitMd5
int wc_Md5GetHash(wc_Md5 *md5, byte *hash)
Gets hash data. Result is placed into hash. Md5 struct is not reset.
void wc_Md5Free(wc_Md5 *)
Resets the Md5 structure. Note: this is only supported if you have WOLFSSL_TI_HASH defined.
int wc_Md5Update(wc_Md5 *md5, const byte *data, word32 len)
Can be called to continually hash the provided byte array of length len.
int wc_Md5Hash(const byte *data, word32 len, byte *hash)
Convenience function, handles all the hashing and places the result into hash.
int wc_Md5Final(wc_Md5 *md5, byte *hash)
Finalizes hashing of data. Result is placed into hash. Md5 Struct is reset. Note: This function will ...
int wc_InitMd5(wc_Md5 *)
This function initializes md5. This is automatically called by wc_Md5Hash.