# Security

[中文]

## Mbed TLS

Starting from ESP-IDF v5.5, there is a change in how the SHA sub-function APIs, `esp_sha_block()` and `esp_sha_dma()`, are used.

Previously, these APIs used to set the SHA mode internally, however, in the updated version, you must explicitly set the SHA mode before invoking them.

For instance, if you intend to use the SHA-256 algorithm, you must first call `esp_sha_set_mode()` with the argument `SHA2_256`:

    esp_sha_set_mode(SHA2_256);

Was this page helpful?

- Thank you! We received your feedback.
- If you have any comments, fill in Espressif Documentation Feedback Form.

- We value your feedback.
- Let us know how we can improve this page by filling in Espressif Documentation Feedback Form.