From e2dc7ac2a9f4d8e07e7c5d11172adba3287e1278 Mon Sep 17 00:00:00 2001 From: Daniel Campora Date: Wed, 10 Jun 2015 20:44:30 +0200 Subject: [PATCH] cc3200: Clarify notes about the extended functionality of uhashlib. --- cc3200/mods/moduhashlib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cc3200/mods/moduhashlib.c b/cc3200/mods/moduhashlib.c index d5e55970fc..78577f524b 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