Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
d96a9164
Commit
d96a9164
authored
Dec 1, 2014
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
docs: Add quick docs for uhashlib.
parent
7f0699ee
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/library/index.rst
+1
-0
1 addition, 0 deletions
docs/library/index.rst
docs/library/uhashlib.rst
+37
-0
37 additions, 0 deletions
docs/library/uhashlib.rst
with
38 additions
and
0 deletions
docs/library/index.rst
+
1
−
0
View file @
d96a9164
...
...
@@ -38,6 +38,7 @@ it will fallback to loading the built-in ``ujson`` module.
.. toctree::
:maxdepth: 1
uhashlib.rst
uheapq.rst
ujson.rst
usocket.rst
...
...
This diff is collapsed.
Click to expand it.
docs/library/uhashlib.rst
0 → 100644
+
37
−
0
View file @
d96a9164
:mod:`uhashlib` -- hashing algorithm
====================================
.. module:: uhashlib
:synopsis: hashing algorithm
This module implements binary data hashing algorithms. Currently, it
implements SHA256 algorithm. Choosing SHA256 was a deliberate choice,
as a modern, cryptographically secure algorithm. This means that a
single algorithm can cover both usecases of "any hash algorithm" and
security-related usage, and thus save space omitting legacy algorithms
like MD5 or SHA1.
Constructors
------------
.. class:: uhashlib.sha256([data])
Create a hasher object and optionally feed ``data`` into it.
Methods
-------
.. method:: sha256.update(data)
Feed more binary data into hash.
.. method:: sha256.digest()
Return hash for all data passed thru hash, as a bytes object. After this
method is called, more data cannot be fed into hash any longer.
.. method:: sha256.hexdigest()
This method is NOT implemented. Use ``ubinascii.hexlify(sha256.digest())``
to achieve similar effect.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment