Module eco.hash.sha256
SHA256 hash functions.
Provides one-shot hashing via sum and incremental hashing via new. The digest is returned as raw binary bytes (32 bytes).
Functions
| sum (data) | Compute SHA256 digest of the given data. |
| new () | Create a new incremental SHA256 context. |
Class sha256
| sha256:update (data) | Update digest with more data. |
| sha256:final () | Finalize and return digest. |
Functions
- sum (data)
-
Compute SHA256 digest of the given data.
Parameters:
- data string Input bytes.
Returns:
-
string
Raw 32-byte digest.
- new ()
-
Create a new incremental SHA256 context.
Returns:
-
sha256
ctx
Class sha256
sha256 object created by new.