We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a8dad6 commit 3362cbbCopy full SHA for 3362cbb
ports/esp32/moduhashlib.c
@@ -46,6 +46,7 @@ STATIC mp_obj_t sha256_make_new(const mp_obj_type_t *type,
46
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(union sha_ctxs));
47
o->base.type = type;
48
mbedtls_sha256_init(&o->state.sha256);
49
+ mbedtls_sha256_starts(&o->state.sha256, 0);
50
if (n_args == 1) {
51
sha256_update(MP_OBJ_FROM_PTR(o), args[0]);
52
}
@@ -58,6 +59,7 @@ STATIC mp_obj_t sha1_make_new(const mp_obj_type_t *type,
58
59
60
61
mbedtls_sha1_init(&o->state.sha1);
62
+ mbedtls_sha1_starts(&o->state.sha1);
63
64
sha1_update(MP_OBJ_FROM_PTR(o), args[0]);
65
0 commit comments