Skip to content

Commit e2dc7ac

Browse files
author
Daniel Campora
committed
cc3200: Clarify notes about the extended functionality of uhashlib.
1 parent 95cc1ff commit e2dc7ac

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cc3200/mods/moduhashlib.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ STATIC mp_obj_t hash_read (mp_obj_t self_in) {
119119
/******************************************************************************/
120120
// Micro Python bindings
121121

122+
/// \classmethod \constructor([data[, block_size]])
123+
/// initial data must be given if block_size wants to be passed
122124
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) {
123125
mp_arg_check_num(n_args, n_kw, 0, 2, false);
124126
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
136138

137139
if (n_args) {
138140
// CPython extension to avoid buffering the data before digesting it
139-
// note: care must be taken to provide all intermidiate blocks as multiple
140-
// of four bytes, otherwise the resulted hash will be incorrect.
141+
// Note: care must be taken to provide all intermediate blocks as multiple
142+
// of four bytes, otherwise the resulting hash will be incorrect.
141143
// the final block can be of any length
142144
if (n_args > 1) {
143145
// block size given, we will feed the data directly into the hash engine

0 commit comments

Comments
 (0)