Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

SHA1 and uhashlib #178

Closed
Closed

Description

@rdagger

I tried to import uhashlib and it doesn't appear to be implemented.
I'm using the latest daily build: esp32-20170911-v1.9.2-270-g14fb53e0.bin
Is there currently any support for sha1?

Activity

  1. MrSurly commented on Sep 11, 2017

    @MrSurly
    Contributor
    MicroPython v1.9.2-270-g14fb53e0 on 2017-09-11; ESP32 module with ESP32
    Type "help()" for more information.
    >>> import binascii, hashlib
    >>> hash = hashlib.sha1('mango')
    >>> binascii.hexlify(hash.digest()) 
    b'934aae49f648ed870c9c421829f4cece6643cf86'
    >>> 

    Works for me, and the hash is correct. Can you send any code that isn't working?

  2. rdagger commented on Sep 11, 2017

    @rdagger
    Author

    Thanks!

  3. MrSurly commented on Sep 11, 2017

    @MrSurly
    Contributor

    If this is resolved, please close.

  4. rdagger commented on Sep 11, 2017

    @rdagger
    Author

    The issue I had was the docs refer to the library as uhashlib instead of just hashlib. Thanks again.

  5. MrSurly commented on Sep 11, 2017

    @MrSurly
    Contributor
  6. nickzoic commented on Sep 12, 2017

    @nickzoic
    Collaborator

    Yeah, just rebuilt and uhashlib won't import

    MicroPython v1.9.2-270-g14fb53e0 on 2017-09-12; ESP32 module with ESP32
    Type "help()" for more information.
    >>> import uhashlib
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: no module named 'uhashlib'
    >>> import hashlib
    >>>
    

    It also doesn't appear in help('modules')

    OK, so the new esp32-specific module was in MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS but wasn't in MICROPY_PORT_BUILTIN_MODULES, is all.

  7. MrSurly commented on Sep 30, 2017

    @MrSurly
    Contributor

    @nickzoic Is this still an issue?

  8. nickzoic commented on Oct 1, 2017

    @nickzoic
    Collaborator

    Ok, merged #179 and closing this ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions