summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/moduhashlib.c
Commit message (Collapse)AuthorAge
* all: Remove 'name' member from mp_obj_module_t struct.Damien George2016-09-22
| | | | One can instead lookup __name__ in the modules dict to get the value.
* extmod/moduhashlib: Use MICROPY_PY_UHASHLIB_SHA1 config define.Paul Sokolovsky2016-01-25
|
* extmod/moduhashlib: Add support for SHA1 (based on axTLS).Paul Sokolovsky2016-01-24
| | | | | | | | | SHA1 is used in a number of protocols and algorithm originated 5 years ago or so, in other words, it's in "wide use", and only newer protocols use SHA2. The implementation depends on axTLS enabled. TODO: Make separate config option specifically for sha1().
* py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George2016-01-11
| | | | | | | | The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
* py: Change type of .make_new and .call args: mp_uint_t becomes size_t.Damien George2016-01-11
| | | | | | | This patch changes the type signature of .make_new and .call object method slots to use size_t for n_args and n_kw (was mp_uint_t. Makes code more efficient when mp_uint_t is larger than a machine word. Doesn't affect ports when size_t and mp_uint_t have the same size.
* extmod/moduhashlib: Add namespace prefix for crypto-algorithms/sha256.h.Paul Sokolovsky2015-12-20
| | | | | | Everyone loves to names similar things the same, then there're conflicts between different libraries. The namespace prefix used is "CRYAL_", which is weird, and that's good, as that minimizes chance of another conflict.
* py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.Damien George2015-11-29
| | | | | | | | | This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
* py: Add MP_ROM_* macros and mp_rom_* types and use them.Damien George2015-11-29
|
* moduhashlib: Remove not implemented .hexdigest().Paul Sokolovsky2015-05-21
| | | | Effect can be easily achieved by ubinsacii.hexlify(hash.digest()).
* py: Remove mp_obj_str_builder and use vstr instead.Damien George2015-01-21
| | | | | | | | | | | | With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64.
* py, unix: Allow to compile with -Wunused-parameter.Damien George2015-01-20
| | | | See issue #699.
* extmod: Prefix py/ for includes from py core directory.Damien George2015-01-01
|
* Use MP_DEFINE_CONST_DICT macro to define module dicts.Damien George2014-11-29
| | | | | This is just a clean-up of the code. Generated code is exactly the same.
* moduhashlib: Integrate sha256 implementation.Paul Sokolovsky2014-11-22
|
* moduhashlib: Initial module skeleton.Paul Sokolovsky2014-11-22