Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 224) sorted by relevance

123456789

/hal_espressif-latest/components/mbedtls/port/aes/
Desp_aes_gcm.c50 static void esp_gcm_ghash(esp_gcm_context *ctx, const unsigned char *x, size_t x_len, uint8_t *z);
56 static void esp_gcm_derive_J0(esp_gcm_context *ctx) in esp_gcm_derive_J0() argument
60 memset(ctx->J0, 0, AES_BLOCK_BYTES); in esp_gcm_derive_J0()
64 if (ctx->iv_len == 12) { in esp_gcm_derive_J0()
65 memcpy(ctx->J0, ctx->iv, ctx->iv_len); in esp_gcm_derive_J0()
66 ctx->J0[AES_BLOCK_BYTES - 1] |= 1; in esp_gcm_derive_J0()
70 esp_gcm_ghash(ctx, ctx->iv, ctx->iv_len, ctx->J0); in esp_gcm_derive_J0()
73 ESP_PUT_BE64(len_buf + 8, ctx->iv_len * 8); in esp_gcm_derive_J0()
75 esp_gcm_ghash(ctx, len_buf, 16, ctx->J0); in esp_gcm_derive_J0()
88 static void increment32_j0(esp_gcm_context *ctx, uint8_t *j) in increment32_j0() argument
[all …]
Desp_aes_common.c32 bool valid_key_length(const esp_aes_context *ctx) in valid_key_length() argument
34 bool valid_len = (ctx->key_bytes == AES_128_KEY_BYTES) || (ctx->key_bytes == AES_256_KEY_BYTES); in valid_key_length()
37 valid_len |= ctx->key_bytes == AES_192_KEY_BYTES; in valid_key_length()
43 void esp_aes_init(esp_aes_context *ctx) in esp_aes_init() argument
45 bzero(ctx, sizeof(esp_aes_context)); in esp_aes_init()
51 void esp_aes_free( esp_aes_context *ctx ) in esp_aes_free() argument
53 if ( ctx == NULL ) { in esp_aes_free()
57 bzero( ctx, sizeof( esp_aes_context ) ); in esp_aes_free()
64 int esp_aes_setkey( esp_aes_context *ctx, const unsigned char *key, in esp_aes_setkey() argument
75 ctx->key_bytes = keybits / 8; in esp_aes_setkey()
[all …]
/hal_espressif-latest/components/mbedtls/port/sha/block/
Desp_sha512.c68 void esp_sha512_set_mode(mbedtls_sha512_context *ctx, esp_sha_type type) in esp_sha512_set_mode() argument
75 ctx->mode = type; in esp_sha512_set_mode()
78 ctx->mode = SHA2_512; in esp_sha512_set_mode()
85 void esp_sha512_set_t( mbedtls_sha512_context *ctx, uint16_t t_val) in esp_sha512_set_t() argument
87 ctx->t_val = t_val; in esp_sha512_set_t()
90 void mbedtls_sha512_init( mbedtls_sha512_context *ctx ) in mbedtls_sha512_init() argument
92 assert(ctx != NULL); in mbedtls_sha512_init()
94 memset( ctx, 0, sizeof( mbedtls_sha512_context ) ); in mbedtls_sha512_init()
97 void mbedtls_sha512_free( mbedtls_sha512_context *ctx ) in mbedtls_sha512_free() argument
99 if ( ctx == NULL ) { in mbedtls_sha512_free()
[all …]
Desp_sha1.c59 void mbedtls_sha1_init( mbedtls_sha1_context *ctx ) in mbedtls_sha1_init() argument
61 assert(ctx != NULL); in mbedtls_sha1_init()
63 memset( ctx, 0, sizeof( mbedtls_sha1_context ) ); in mbedtls_sha1_init()
66 void mbedtls_sha1_free( mbedtls_sha1_context *ctx ) in mbedtls_sha1_free() argument
68 if ( ctx == NULL ) { in mbedtls_sha1_free()
71 mbedtls_zeroize( ctx, sizeof( mbedtls_sha1_context ) ); in mbedtls_sha1_free()
83 int mbedtls_sha1_starts( mbedtls_sha1_context *ctx ) in mbedtls_sha1_starts() argument
85 ctx->total[0] = 0; in mbedtls_sha1_starts()
86 ctx->total[1] = 0; in mbedtls_sha1_starts()
87 memset( ctx, 0, sizeof( mbedtls_sha1_context ) ); in mbedtls_sha1_starts()
[all …]
Desp_sha256.c68 void mbedtls_sha256_init( mbedtls_sha256_context *ctx ) in mbedtls_sha256_init() argument
70 assert(ctx != NULL); in mbedtls_sha256_init()
72 memset( ctx, 0, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_init()
75 void mbedtls_sha256_free( mbedtls_sha256_context *ctx ) in mbedtls_sha256_free() argument
77 if ( ctx == NULL ) { in mbedtls_sha256_free()
81 mbedtls_zeroize( ctx, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_free()
93 int mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 ) in mbedtls_sha256_starts() argument
95 memset( ctx, 0, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_starts()
98 ctx->mode = SHA2_224; in mbedtls_sha256_starts()
100 ctx->mode = SHA2_256; in mbedtls_sha256_starts()
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/crypto/
Dcrypto_internal.c42 struct crypto_hash *ctx; in crypto_hash_init() local
47 ctx = os_zalloc(sizeof(*ctx)); in crypto_hash_init()
48 if (ctx == NULL) in crypto_hash_init()
51 ctx->alg = alg; in crypto_hash_init()
55 MD5Init(&ctx->u.md5); in crypto_hash_init()
58 SHA1Init(&ctx->u.sha1); in crypto_hash_init()
62 sha256_init(&ctx->u.sha256); in crypto_hash_init()
67 sha384_init(&ctx->u.sha384); in crypto_hash_init()
72 sha512_init(&ctx->u.sha512); in crypto_hash_init()
77 MD5Init(&ctx->u.md5); in crypto_hash_init()
[all …]
Dcrypto_internal-cipher.c47 struct crypto_cipher *ctx; in crypto_cipher_init() local
49 ctx = os_zalloc(sizeof(*ctx)); in crypto_cipher_init()
50 if (ctx == NULL) in crypto_cipher_init()
53 ctx->alg = alg; in crypto_cipher_init()
57 if (key_len > sizeof(ctx->u.rc4.key)) { in crypto_cipher_init()
58 os_free(ctx); in crypto_cipher_init()
61 ctx->u.rc4.keylen = key_len; in crypto_cipher_init()
62 os_memcpy(ctx->u.rc4.key, key, key_len); in crypto_cipher_init()
65 ctx->u.aes.ctx_enc = aes_encrypt_init(key, key_len); in crypto_cipher_init()
66 if (ctx->u.aes.ctx_enc == NULL) { in crypto_cipher_init()
[all …]
/hal_espressif-latest/components/mbedtls/port/sha/dma/
Desp_sha512.c67 void esp_sha512_set_mode(mbedtls_sha512_context *ctx, esp_sha_type type) in esp_sha512_set_mode() argument
74 ctx->mode = type; in esp_sha512_set_mode()
77 ctx->mode = SHA2_512; in esp_sha512_set_mode()
84 void esp_sha512_set_t( mbedtls_sha512_context *ctx, uint16_t t_val) in esp_sha512_set_t() argument
86 ctx->t_val = t_val; in esp_sha512_set_t()
89 void mbedtls_sha512_init( mbedtls_sha512_context *ctx ) in mbedtls_sha512_init() argument
91 memset( ctx, 0, sizeof( mbedtls_sha512_context ) ); in mbedtls_sha512_init()
94 void mbedtls_sha512_free( mbedtls_sha512_context *ctx ) in mbedtls_sha512_free() argument
96 if ( ctx == NULL ) { in mbedtls_sha512_free()
100 mbedtls_zeroize( ctx, sizeof( mbedtls_sha512_context ) ); in mbedtls_sha512_free()
[all …]
Desp_sha1.c58 void mbedtls_sha1_init( mbedtls_sha1_context *ctx ) in mbedtls_sha1_init() argument
60 memset( ctx, 0, sizeof( mbedtls_sha1_context ) ); in mbedtls_sha1_init()
63 void mbedtls_sha1_free( mbedtls_sha1_context *ctx ) in mbedtls_sha1_free() argument
65 if ( ctx == NULL ) { in mbedtls_sha1_free()
68 mbedtls_zeroize( ctx, sizeof( mbedtls_sha1_context ) ); in mbedtls_sha1_free()
80 int mbedtls_sha1_starts( mbedtls_sha1_context *ctx ) in mbedtls_sha1_starts() argument
82 ctx->total[0] = 0; in mbedtls_sha1_starts()
83 ctx->total[1] = 0; in mbedtls_sha1_starts()
85 memset( ctx, 0, sizeof( mbedtls_sha1_context ) ); in mbedtls_sha1_starts()
86 ctx->mode = SHA1; in mbedtls_sha1_starts()
[all …]
Desp_sha256.c67 void mbedtls_sha256_init( mbedtls_sha256_context *ctx ) in mbedtls_sha256_init() argument
69 memset( ctx, 0, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_init()
72 void mbedtls_sha256_free( mbedtls_sha256_context *ctx ) in mbedtls_sha256_free() argument
74 if ( ctx == NULL ) { in mbedtls_sha256_free()
78 mbedtls_zeroize( ctx, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_free()
90 int mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 ) in mbedtls_sha256_starts() argument
92 memset( ctx, 0, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_starts()
95 ctx->mode = SHA2_224; in mbedtls_sha256_starts()
97 ctx->mode = SHA2_256; in mbedtls_sha256_starts()
103 static void esp_internal_sha_update_state(mbedtls_sha256_context *ctx) in esp_internal_sha_update_state() argument
[all …]
/hal_espressif-latest/components/mbedtls/port/aes/block/
Desp_aes.c82 static int esp_aes_block(esp_aes_context *ctx, const void *input, void *output) in esp_aes_block() argument
93 if (ctx->key_in_hardware != ctx->key_bytes) { in esp_aes_block()
122 static int esp_aes_validate_input(esp_aes_context *ctx, const unsigned char *input, in esp_aes_validate_input() argument
125 if (!ctx) { in esp_aes_validate_input()
142 void esp_aes_encrypt(esp_aes_context *ctx, in esp_aes_encrypt() argument
146 esp_internal_aes_encrypt(ctx, input, output); in esp_aes_encrypt()
152 int esp_internal_aes_encrypt(esp_aes_context *ctx, in esp_internal_aes_encrypt() argument
158 if (esp_aes_validate_input(ctx, input, output)) { in esp_internal_aes_encrypt()
162 if (!valid_key_length(ctx)) { in esp_internal_aes_encrypt()
167 ctx->key_in_hardware = 0; in esp_internal_aes_encrypt()
[all …]
/hal_espressif-latest/components/mbedtls/port/sha/parallel_engine/
Desp_sha512.c43 inline static esp_sha_type sha_type(const mbedtls_sha512_context *ctx) in sha_type() argument
45 return ctx->is384 ? SHA2_384 : SHA2_512; in sha_type()
88 void mbedtls_sha512_init( mbedtls_sha512_context *ctx ) in mbedtls_sha512_init() argument
90 memset( ctx, 0, sizeof( mbedtls_sha512_context ) ); in mbedtls_sha512_init()
93 void mbedtls_sha512_free( mbedtls_sha512_context *ctx ) in mbedtls_sha512_free() argument
95 if ( ctx == NULL ) { in mbedtls_sha512_free()
99 if (ctx->mode == ESP_MBEDTLS_SHA512_HARDWARE) { in mbedtls_sha512_free()
100 esp_sha_unlock_engine(sha_type(ctx)); in mbedtls_sha512_free()
102 mbedtls_zeroize( ctx, sizeof( mbedtls_sha512_context ) ); in mbedtls_sha512_free()
127 int mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 ) in mbedtls_sha512_starts() argument
[all …]
Desp_sha256.c69 void mbedtls_sha256_init( mbedtls_sha256_context *ctx ) in mbedtls_sha256_init() argument
71 memset( ctx, 0, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_init()
74 void mbedtls_sha256_free( mbedtls_sha256_context *ctx ) in mbedtls_sha256_free() argument
76 if ( ctx == NULL ) { in mbedtls_sha256_free()
80 if (ctx->mode == ESP_MBEDTLS_SHA256_HARDWARE) { in mbedtls_sha256_free()
83 mbedtls_zeroize( ctx, sizeof( mbedtls_sha256_context ) ); in mbedtls_sha256_free()
103 int mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 ) in mbedtls_sha256_starts() argument
105 ctx->total[0] = 0; in mbedtls_sha256_starts()
106 ctx->total[1] = 0; in mbedtls_sha256_starts()
110 ctx->state[0] = 0x6A09E667; in mbedtls_sha256_starts()
[all …]
/hal_espressif-latest/components/esp_system/task_wdt/
Dtask_wdt_impl_timergroup.c47 twdt_ctx_hard_t *ctx = &init_context; in esp_task_wdt_impl_timer_allocate() local
54 esp_intr_alloc(TWDT_INTR_SOURCE, 0, callback, NULL, &ctx->intr_handle); in esp_task_wdt_impl_timer_allocate()
59 wdt_hal_init(&ctx->hal, TWDT_INSTANCE, TWDT_PRESCALER, true); in esp_task_wdt_impl_timer_allocate()
61 wdt_hal_write_protect_disable(&ctx->hal); in esp_task_wdt_impl_timer_allocate()
63 …wdt_hal_config_stage(&ctx->hal, WDT_STAGE0, config->timeout_ms * (1000 / TWDT_TICKS_PER_US), WDT_S… in esp_task_wdt_impl_timer_allocate()
65 …wdt_hal_config_stage(&ctx->hal, WDT_STAGE1, config->timeout_ms * (2 * 1000 / TWDT_TICKS_PER_US), W… in esp_task_wdt_impl_timer_allocate()
67 wdt_hal_write_protect_enable(&ctx->hal); in esp_task_wdt_impl_timer_allocate()
70 *obj = (twdt_ctx_t) ctx; in esp_task_wdt_impl_timer_allocate()
81 twdt_ctx_hard_t* ctx = (twdt_ctx_hard_t*) obj; in esp_task_wdt_impl_timer_reconfigure() local
83 if (config == NULL || ctx == NULL) { in esp_task_wdt_impl_timer_reconfigure()
[all …]
Dtask_wdt_impl_esp_timer.c41 twdt_ctx_soft_t *ctx = &init_context; in esp_task_wdt_impl_timer_allocate() local
51 esp_err_t ret = esp_timer_create(&timer_args, &ctx->sw_timer); in esp_task_wdt_impl_timer_allocate()
56 ctx->period_ms = config->timeout_ms; in esp_task_wdt_impl_timer_allocate()
59 *obj = (twdt_ctx_t) ctx; in esp_task_wdt_impl_timer_allocate()
68 twdt_ctx_soft_t* ctx = (twdt_ctx_soft_t*) obj; in esp_task_wdt_impl_timer_reconfigure() local
70 if (config == NULL || ctx == NULL) { in esp_task_wdt_impl_timer_reconfigure()
78 ctx->period_ms = config->timeout_ms; in esp_task_wdt_impl_timer_reconfigure()
87 const twdt_ctx_soft_t* ctx = (twdt_ctx_soft_t*) obj; in esp_task_wdt_impl_timer_free() local
89 if (ctx != NULL && ctx->sw_timer != NULL) { in esp_task_wdt_impl_timer_free()
90 ESP_ERROR_CHECK(esp_timer_delete(ctx->sw_timer)); in esp_task_wdt_impl_timer_free()
[all …]
/hal_espressif-latest/components/esp_hw_support/port/esp32c6/
Dpmu_init.c45 void pmu_hp_system_init(pmu_context_t *ctx, pmu_hp_mode_t mode, const pmu_hp_system_param_t *param) in pmu_hp_system_init() argument
53 assert(ctx->hal); in pmu_hp_system_init()
55 pmu_ll_hp_set_dig_power(ctx->hal->dev, mode, power->dig_power.val); in pmu_hp_system_init()
56 pmu_ll_hp_set_clk_power(ctx->hal->dev, mode, power->clk_power.val); in pmu_hp_system_init()
57 pmu_ll_hp_set_xtal_xpd (ctx->hal->dev, mode, power->xtal.xpd_xtal); in pmu_hp_system_init()
60 pmu_ll_hp_set_icg_func (ctx->hal->dev, mode, clock->icg_func); in pmu_hp_system_init()
61 pmu_ll_hp_set_icg_apb (ctx->hal->dev, mode, clock->icg_apb); in pmu_hp_system_init()
62 pmu_ll_hp_set_icg_modem (ctx->hal->dev, mode, clock->icg_modem.code); in pmu_hp_system_init()
63 pmu_ll_hp_set_sysclk_nodiv (ctx->hal->dev, mode, clock->sysclk.dig_sysclk_nodiv); in pmu_hp_system_init()
64 pmu_ll_hp_set_icg_sysclk_enable (ctx->hal->dev, mode, clock->sysclk.icg_sysclk_en); in pmu_hp_system_init()
[all …]
/hal_espressif-latest/components/esp_hw_support/port/esp32h2/
Dpmu_init.c46 void pmu_hp_system_init(pmu_context_t *ctx, pmu_hp_mode_t mode, const pmu_hp_system_param_t *param) in pmu_hp_system_init() argument
54 assert(ctx->hal); in pmu_hp_system_init()
56 pmu_ll_hp_set_dig_power(ctx->hal->dev, mode, power->dig_power.val); in pmu_hp_system_init()
57 pmu_ll_hp_set_clk_power(ctx->hal->dev, mode, power->clk_power.val); in pmu_hp_system_init()
58 pmu_ll_hp_set_xtal_xpd (ctx->hal->dev, mode, power->xtal.xpd_xtal); in pmu_hp_system_init()
61 pmu_ll_hp_set_icg_func (ctx->hal->dev, mode, clock->icg_func); in pmu_hp_system_init()
62 pmu_ll_hp_set_icg_apb (ctx->hal->dev, mode, clock->icg_apb); in pmu_hp_system_init()
63 pmu_ll_hp_set_icg_modem (ctx->hal->dev, mode, clock->icg_modem.code); in pmu_hp_system_init()
64 pmu_ll_hp_set_sysclk_nodiv (ctx->hal->dev, mode, clock->sysclk.dig_sysclk_nodiv); in pmu_hp_system_init()
65 pmu_ll_hp_set_icg_sysclk_enable (ctx->hal->dev, mode, clock->sysclk.icg_sysclk_en); in pmu_hp_system_init()
[all …]
/hal_espressif-latest/components/bt/porting/ext/tinycrypt/src/
Dhmac.c52 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, in tc_hmac_set_key() argument
57 if (ctx == (TCHmacState_t) 0 || in tc_hmac_set_key()
82 rekey(ctx->key, key, key_size); in tc_hmac_set_key()
84 (void)tc_sha256_init(&ctx->hash_state); in tc_hmac_set_key()
85 (void)tc_sha256_update(&ctx->hash_state, key, key_size); in tc_hmac_set_key()
86 (void)tc_sha256_final(&ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
87 &ctx->hash_state); in tc_hmac_set_key()
88 rekey(ctx->key, in tc_hmac_set_key()
89 &ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
96 int tc_hmac_init(TCHmacState_t ctx) in tc_hmac_init() argument
[all …]
Dctr_prng.c74 static void tc_ctr_prng_update(TCCtrPrng_t * const ctx, uint8_t const * const providedData) in tc_ctr_prng_update() argument
76 if (0 != ctx) { in tc_ctr_prng_update()
87 arrInc(ctx->V, sizeof ctx->V); in tc_ctr_prng_update()
93 (void)tc_aes_encrypt(output_block, ctx->V, &ctx->key); in tc_ctr_prng_update()
110 (void)tc_aes128_set_encrypt_key(&ctx->key, temp); in tc_ctr_prng_update()
113 memcpy(ctx->V, &(temp[TC_AES_KEY_SIZE]), TC_AES_BLOCK_SIZE); in tc_ctr_prng_update()
117 int tc_ctr_prng_init(TCCtrPrng_t * const ctx, in tc_ctr_prng_init() argument
140 if ((0 != ctx) && (0 != entropy) && (entropyLen >= sizeof seed_material)) { in tc_ctr_prng_init()
148 (void)tc_aes128_set_encrypt_key(&ctx->key, zeroArr); in tc_ctr_prng_init()
151 memset(ctx->V, 0x00, sizeof ctx->V); in tc_ctr_prng_init()
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/
Dhmac.c52 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, in tc_hmac_set_key() argument
56 if (ctx == (TCHmacState_t) 0 || in tc_hmac_set_key()
81 rekey(ctx->key, key, key_size); in tc_hmac_set_key()
83 (void)tc_sha256_init(&ctx->hash_state); in tc_hmac_set_key()
84 (void)tc_sha256_update(&ctx->hash_state, key, key_size); in tc_hmac_set_key()
85 (void)tc_sha256_final(&ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
86 &ctx->hash_state); in tc_hmac_set_key()
87 rekey(ctx->key, in tc_hmac_set_key()
88 &ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
95 int tc_hmac_init(TCHmacState_t ctx) in tc_hmac_init() argument
[all …]
Dctr_prng.c74 static void tc_ctr_prng_update(TCCtrPrng_t *const ctx, uint8_t const *const providedData) in tc_ctr_prng_update() argument
76 if (0 != ctx) { in tc_ctr_prng_update()
87 arrInc(ctx->V, sizeof ctx->V); in tc_ctr_prng_update()
93 (void)tc_aes_encrypt(output_block, ctx->V, &ctx->key); in tc_ctr_prng_update()
110 (void)tc_aes128_set_encrypt_key(&ctx->key, temp); in tc_ctr_prng_update()
113 memcpy(ctx->V, &(temp[TC_AES_KEY_SIZE]), TC_AES_BLOCK_SIZE); in tc_ctr_prng_update()
117 int tc_ctr_prng_init(TCCtrPrng_t *const ctx, in tc_ctr_prng_init() argument
140 if ((0 != ctx) && (0 != entropy) && (entropyLen >= sizeof seed_material)) { in tc_ctr_prng_init()
148 (void)tc_aes128_set_encrypt_key(&ctx->key, zeroArr); in tc_ctr_prng_init()
151 memset(ctx->V, 0x00, sizeof ctx->V); in tc_ctr_prng_init()
[all …]
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/crypto/
Dfastpbkdf2.c108 static inline void HMAC_INIT(_name)(HMAC_CTX(_name) *ctx, \
117 _init(&ctx->inner); \
118 _update(&ctx->inner, key, nkey); \
119 _final(&ctx->inner, k); \
144 _init(&ctx->inner); \
145 _update(&ctx->inner, blk_inner, sizeof blk_inner); \
148 _init(&ctx->outer); \
149 _update(&ctx->outer, blk_outer, sizeof blk_outer); \
152 static inline void HMAC_UPDATE(_name)(HMAC_CTX(_name) *ctx, \
155 _update(&ctx->inner, data, ndata); \
[all …]
/hal_espressif-latest/components/mbedtls/port/sha/
Desp_sha.c40 } ctx; in esp_sha() local
47 mbedtls_sha1_init(&ctx.sha1); in esp_sha()
48 mbedtls_sha1_starts(&ctx.sha1); in esp_sha()
49 ret = mbedtls_sha1_update(&ctx.sha1, input, ilen); in esp_sha()
51 ret = mbedtls_sha1_finish(&ctx.sha1, output); in esp_sha()
53 mbedtls_sha1_free(&ctx.sha1); in esp_sha()
60 mbedtls_sha256_init(&ctx.sha256); in esp_sha()
61 mbedtls_sha256_starts(&ctx.sha256, 0); in esp_sha()
62 ret = mbedtls_sha256_update(&ctx.sha256, input, ilen); in esp_sha()
64 ret = mbedtls_sha256_finish(&ctx.sha256, output); in esp_sha()
[all …]
/hal_espressif-latest/components/hal/
Dcache_hal.c52 static cache_hal_context_t ctx; variable
57 ctx.data_autoload_flag = INST_AUTOLOAD_FLAG; in cache_hal_init()
58 Cache_Enable_ICache(ctx.data_autoload_flag); in cache_hal_init()
60 ctx.data_autoload_flag = DATA_AUTOLOAD_FLAG; in cache_hal_init()
61 Cache_Enable_DCache(ctx.data_autoload_flag); in cache_hal_init()
62 ctx.inst_autoload_flag = INST_AUTOLOAD_FLAG; in cache_hal_init()
63 Cache_Enable_ICache(ctx.inst_autoload_flag); in cache_hal_init()
75 ctx.cache_enabled = 1; in cache_hal_init()
95 ctx.cache_enabled = 0; in cache_hal_disable()
102 Cache_Enable_ICache(ctx.inst_autoload_flag); in cache_hal_enable()
[all …]
/hal_espressif-latest/components/mbedtls/port/md/
Desp_md.c14 int esp_md5_finish( mbedtls_md5_context *ctx, unsigned char output[16] ) in esp_md5_finish() argument
16 esp_rom_md5_final(output, ctx); in esp_md5_finish()
22 int esp_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen ) in esp_md5_update() argument
24 esp_rom_md5_update(ctx, input, ilen); in esp_md5_update()
30 void esp_md5_init( mbedtls_md5_context *ctx ) in esp_md5_init() argument
32 esp_rom_md5_init(ctx); in esp_md5_init()
35 int esp_md5_starts( mbedtls_md5_context *ctx ) in esp_md5_starts() argument
37 esp_md5_init(ctx); in esp_md5_starts()
41 void esp_md5_free( mbedtls_md5_context *ctx ) in esp_md5_free() argument
43 if (ctx == NULL) { in esp_md5_free()
[all …]

123456789