diff --git a/docs/library/hashlib.rst b/docs/library/hashlib.rst deleted file mode 100644 index 061f9fd1e0..0000000000 --- a/docs/library/hashlib.rst +++ /dev/null @@ -1,60 +0,0 @@ -:mod:`hashlib` -- hashing algorithms -===================================== - -.. include:: ../templates/unsupported_in_circuitpython.inc - -.. module:: hashlib - :synopsis: hashing algorithms - :noindex: - -|see_cpython_module| :mod:`cpython:hashlib`. - -This module implements binary data hashing algorithms. The exact inventory -of available algorithms depends on a board. Among the algorithms which may -be implemented: - -* SHA256 - The current generation, modern hashing algorithm (of SHA2 series). - It is suitable for cryptographically-secure purposes. Included in the - MicroPython core and any board is recommended to provide this, unless - it has particular code size constraints. - -* SHA1 - A previous generation algorithm. Not recommended for new usages, - but SHA1 is a part of number of Internet standards and existing - applications, so boards targeting network connectivity and - interoperability will try to provide this. - -* MD5 - A legacy algorithm, not considered cryptographically secure. Only - selected boards, targeting interoperability with legacy applications, - will offer this. - -Constructors ------------- - -.. class:: hashlib.sha256([data]) - - Create an SHA256 hasher object and optionally feed ``data`` into it. - -.. class:: hashlib.sha1([data]) - - Create an SHA1 hasher object and optionally feed ``data`` into it. - -.. class:: hashlib.md5([data]) - - Create an MD5 hasher object and optionally feed ``data`` into it. - -Methods -------- - -.. method:: hash.update(data) - - Feed more binary data into hash. - -.. method:: hash.digest() - - Return hash for all data passed through hash, as a bytes object. After this - method is called, more data cannot be fed into the hash any longer. - -.. method:: hash.hexdigest() - - This method is NOT implemented. Use ``binascii.hexlify(hash.digest())`` - to achieve a similar effect. diff --git a/docs/library/index.rst b/docs/library/index.rst index 5d8dd3118f..b71949c2dd 100644 --- a/docs/library/index.rst +++ b/docs/library/index.rst @@ -19,7 +19,7 @@ limited flash memory, usually on non-Express builds: ``binascii``, ``errno``, ``json``, ``re``. These libraries are not currently enabled in any CircuitPython build, but may be in the future: -``ctypes``, ``hashlib``, ``zlib``. +``ctypes`` .. toctree:: :maxdepth: 1 @@ -31,7 +31,6 @@ These libraries are not currently enabled in any CircuitPython build, but may be collections.rst errno.rst gc.rst - hashlib.rst io.rst json.rst re.rst @@ -39,7 +38,6 @@ These libraries are not currently enabled in any CircuitPython build, but may be asyncio.rst ctypes.rst select.rst - zlib.rst Omitted functions in the ``string`` library ------------------------------------------- diff --git a/docs/library/zlib.rst b/docs/library/zlib.rst deleted file mode 100644 index 514b787bc4..0000000000 --- a/docs/library/zlib.rst +++ /dev/null @@ -1,42 +0,0 @@ -:mod:`zlib` -- zlib decompression -================================= - -.. include:: ../templates/unsupported_in_circuitpython.inc - -.. module:: zlib - :synopsis: zlib decompression - :noindex: - -|see_cpython_module| :mod:`cpython:zlib`. - -This module allows to decompress binary data compressed with -`DEFLATE algorithm `_ -(commonly used in zlib library and gzip archiver). Compression -is not yet implemented. - -Functions ---------- - -.. function:: decompress(data, wbits=0, bufsize=0, /) - - Return decompressed *data* as bytes. *wbits* is DEFLATE dictionary window - size used during compression (8-15, the dictionary size is power of 2 of - that value). Additionally, if value is positive, *data* is assumed to be - zlib stream (with zlib header). Otherwise, if it's negative, it's assumed - to be raw DEFLATE stream. *bufsize* parameter is for compatibility with - CPython and is ignored. - -.. class:: DecompIO(stream, wbits=0, /) - :noindex: - - Create a ``stream`` wrapper which allows transparent decompression of - compressed data in another *stream*. This allows to process compressed - streams with data larger than available heap size. In addition to - values described in :func:`decompress`, *wbits* may take values - 24..31 (16 + 8..15), meaning that input stream has gzip header. - - .. admonition:: Difference to CPython - :class: attention - - This class is MicroPython extension. It's included on provisional - basis and may be changed considerably or removed in later versions.