diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2018-01-07 15:13:56 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-06-27 14:54:40 +1000 |
commit | 567bc2d6ce18f55e7a1d2c8e023ead44f5c2cc45 (patch) | |
tree | c456dd0222cc52ca7f2df9c9a5fcc42b4c277c36 /py/objmodule.c | |
parent | b9ec6037edf5e6ff6f8f400d70f7351d1b0af67d (diff) | |
download | micropython-567bc2d6ce18f55e7a1d2c8e023ead44f5c2cc45.tar.gz micropython-567bc2d6ce18f55e7a1d2c8e023ead44f5c2cc45.zip |
extmod/moducryptolib: Add ucryptolib module with crypto functions.
The API follows guidelines of https://www.python.org/dev/peps/pep-0272/,
but is optimized for code size, with the idea that full PEP 0272
compatibility can be added with a simple Python wrapper mode.
The naming of the module follows (u)hashlib pattern.
At the bare minimum, this module is expected to provide:
* AES128, ECB (i.e. "null") mode, encrypt only
Implementation in this commit is based on axTLS routines, and implements
following:
* AES 128 and 256
* ECB and CBC modes
* encrypt and decrypt
Diffstat (limited to 'py/objmodule.c')
-rw-r--r-- | py/objmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py/objmodule.c b/py/objmodule.c index c4aba3a7b4..7ec66adf3b 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -193,6 +193,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = { #if MICROPY_PY_UHASHLIB { MP_ROM_QSTR(MP_QSTR_uhashlib), MP_ROM_PTR(&mp_module_uhashlib) }, #endif +#if MICROPY_PY_UCRYPTOLIB + { MP_ROM_QSTR(MP_QSTR_ucryptolib), MP_ROM_PTR(&mp_module_ucryptolib) }, +#endif #if MICROPY_PY_UBINASCII { MP_ROM_QSTR(MP_QSTR_ubinascii), MP_ROM_PTR(&mp_module_ubinascii) }, #endif |