Skip to main content
Version: 0.1.23

MD5

warning

MD5 is no longer recommended due to serious cryptographic weaknesses. It is vulnerable to practical collision and preimage attacks, making it unsuitable for security-sensitive tasks such as digital signatures, certificate validation, or password hashing. MD5 should only be used for legacy compatibility purposes and never for new designs or where security is a concern.

:::

API

noxtls_md5_init

noxtls_return_t noxtls_md5_init(noxtls_sha_ctx_t * ctx);

Initialize the MD5 Context

Parameters:

Returns: noxtls_return_t: NOXTLS_RETURN_SUCCESS on success.

noxtls_md5_round

noxtls_return_t noxtls_md5_round(noxtls_sha_ctx_t * ctx, const uint8_t * input);

Performs an MD5 round

Parameters:

Returns: noxtls_return_t: NOXTLS_RETURN_SUCCESS on success, or another error code otherwise

noxtls_md5_finish

noxtls_return_t noxtls_md5_finish(noxtls_sha_ctx_t * ctx, uint8_t * hash);

Finish MD5 operation

Parameters:

Returns: noxtls_return_t: NOXTLS_RETURN_SUCCESS on success, or another error code otherwise

noxtls_md5_verify

noxtls_return_t noxtls_md5_verify(uint8_t * data, uint32_t len, uint8_t * expected);

Takes data and verifies it matches a MD5 Digest

Parameters:

  • data — is the input data
  • len — is the length of the input data
  • expected — is the expected MD5 digest

Returns: noxtls_return_t: NOXTLS_RETURN_SUCCESS on success, or another error code otherwise

noxtls_md5_set_debug

void noxtls_md5_set_debug(uint8_t lvl);

Sets Module Debug level

Parameters:

  • lvl — is the debug level