Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
2fddc68f
Commit
2fddc68f
authored
May 21, 2015
by
Paul Sokolovsky
Browse files
moduhashlib: Remove not implemented .hexdigest().
Effect can be easily achieved by ubinsacii.hexlify(hash.digest()).
parent
0f716ace
Changes
1
Hide whitespace changes
Inline
Side-by-side
extmod/moduhashlib.c
View file @
2fddc68f
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment