summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Campora <daniel@wipy.io>2015-06-10 20:44:30 +0200
committerDaniel Campora <daniel@wipy.io>2015-06-10 23:35:41 +0200
commite2dc7ac2a9f4d8e07e7c5d11172adba3287e1278 (patch)
tree164fca50637e87990df1a5153b75405ed26dd5f6
parent95cc1ff542cac5af726b89b87bbeedc7d140aeb7 (diff)
cc3200: Clarify notes about the extended functionality of uhashlib.
-rw-r--r--cc3200/mods/moduhashlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cc3200/mods/moduhashlib.c b/cc3200/mods/moduhashlib.c
index d5e55970f..78577f524 100644
--- a/cc3200/mods/moduhashlib.c
+++ b/cc3200/mods/moduhashlib.c
@@ -119,6 +119,8 @@ STATIC mp_obj_t hash_read (mp_obj_t self_in) {
/******************************************************************************/
// Micro Python bindings
+/// \classmethod \constructor([data[, block_size]])
+/// initial data must be given if block_size wants to be passed
STATIC mp_obj_t hash_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, n_kw, 0, 2, false);
mp_obj_hash_t *self = m_new0(mp_obj_hash_t, 1);
@@ -136,8 +138,8 @@ STATIC mp_obj_t hash_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw
if (n_args) {
// CPython extension to avoid buffering the data before digesting it
- // note: care must be taken to provide all intermidiate blocks as multiple
- // of four bytes, otherwise the resulted hash will be incorrect.
+ // Note: care must be taken to provide all intermediate blocks as multiple
+ // of four bytes, otherwise the resulting hash will be incorrect.
// the final block can be of any length
if (n_args > 1) {
// block size given, we will feed the data directly into the hash engine