Select one of the symbols to view example projects that use it.
 
Outline
#define _ROM_SHA_H_
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
SHAContext
SHA_TYPE
ets_sha_init(SHA_CTX *);
ets_sha_enable();
ets_sha_disable();
ets_sha_update(SHA_CTX *, enum SHA_TYPE, const uint8_t *, size_t);
ets_sha_finish(SHA_CTX *, enum SHA_TYPE, uint8_t *);
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/esp_rom/esp32/include/esp32/rom/sha.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* ROM functions for hardware SHA support. It is not recommended to use these functions directly. If using them from esp-idf then use the esp_sha_lock_engine() and esp_sha_lock_memory_block() functions in esp32/sha.h to ensure exclusive access. *//* ... */ /* * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #ifndef _ROM_SHA_H_ #define _ROM_SHA_H_ #include <stdint.h> #include <stdbool.h> #include <stddef.h> #ifdef __cplusplus extern "C" { #endif typedef struct SHAContext { bool start; uint32_t total_input_bits[4]; }{ ... } SHA_CTX; enum SHA_TYPE { SHA1 = 0, SHA2_256, SHA2_384, SHA2_512, SHA_INVALID = -1, }{ ... }; /* Do not use these function in multi core mode due to * inside they have no safe implementation (without DPORT workaround). *//* ... */ void ets_sha_init(SHA_CTX *ctx); void ets_sha_enable(void); void ets_sha_disable(void); void ets_sha_update(SHA_CTX *ctx, enum SHA_TYPE type, const uint8_t *input, size_t input_bits); void ets_sha_finish(SHA_CTX *ctx, enum SHA_TYPE type, uint8_t *output); #ifdef __cplusplus }{...} #endif /* ... */ #endif /* _ROM_SHA_H_ */
Details