Commit 2fddc68f authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

moduhashlib: Remove not implemented .hexdigest().

Effect can be easily achieved by ubinsacii.hexlify(hash.digest()).
parent 0f716ace
......@@ -70,22 +70,9 @@ STATIC mp_obj_t hash_digest(mp_obj_t self_in) {
}
MP_DEFINE_CONST_FUN_OBJ_1(hash_digest_obj, hash_digest);
STATIC mp_obj_t hash_hexdigest(mp_obj_t self_in) {
(void)self_in;
mp_not_implemented("");
#if 0
mp_obj_hash_t *self = self_in;
byte hash[SHA256_BLOCK_SIZE];
sha256_final((SHA256_CTX*)self->state, hash);
return mp_obj_new_str((char*)hash, SHA256_BLOCK_SIZE, false);
#endif
}
MP_DEFINE_CONST_FUN_OBJ_1(hash_hexdigest_obj, hash_hexdigest);
STATIC const mp_map_elem_t hash_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_update), (mp_obj_t) &hash_update_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_digest), (mp_obj_t) &hash_digest_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_hexdigest), (mp_obj_t) &hash_hexdigest_obj },
};
STATIC MP_DEFINE_CONST_DICT(hash_locals_dict, hash_locals_dict_table);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment