No project description provided
Project description
SHA-py
Using SHA-3 and Keccak cryptographic algorithms based on Rust crate sha3
For fun. To be improved
Installation
pip install sha_rs
Usage
from sha_rs import sha3_224, sha3_256, sha3_384, sha3_512
from sha_rs import keccak_224, keccak_256, keccak_384, keccak_512
# Keccak
assert keccak_224(b"hello") == "45524ec454bcc7d4b8f74350c4a4e62809fcb49bc29df62e61b69fa4"
assert keccak_256(b"hello") == "1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"
assert keccak_384(b"hello") == "dcef6fb7908fd52ba26aaba75121526abbf1217f1c0a31024652d134d3e32fb4cd8e9c703b8f43e7277b59a5cd402175"
assert keccak_512(b"hello") == "52fa80662e64c128f8389c9ea6c73d4c02368004bf4463491900d11aaadca39d47de1b01361f207c512cfa79f0f92c3395c67ff7928e3f5ce3e3c852b392f976"
# Sha3
assert sha3_224(b"hello") == "b87f88c72702fff1748e58b87e9141a42c0dbedc29a78cb0d4a5cd81"
assert sha3_256(b"hello") == "3338be694f50c5f338814986cdf0686453a888b84f424d792af4b9202398f392"
assert sha3_384(b"hello") == "720aea11019ef06440fbf05d87aa24680a2153df3907b23631e7177ce620fa1330ff07c0fddee54699a4c3ee0ee9d887"
assert sha3_512(b"hello") == "75d527c368f2efe848ecf6b073a36767800805e9eef2b1857d5f984f036eb6df891d75f72d9b154518c1cd58835286d1da9a38deba3de98b5a53e5ed78a84976"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sha_rs-1.0.0.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file sha_rs-1.0.0.tar.gz
.
File metadata
- Download URL: sha_rs-1.0.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32ef2719526c58f36fb7a334138bea73242efdae9309a3ef21e66a54508fdd69 |
|
MD5 | d35b49fc7ae5c25b6a32e1d626956d50 |
|
BLAKE2b-256 | 0543d984f28aac4351276b82a3f8c0f63e5526975cbec8f72bbe8fd8df57cdcf |
File details
Details for the file sha_rs-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: sha_rs-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 174.7 kB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7de25cf15563f7a067cb9e2058cd17f01aa97825769dac9016a01a271cb32870 |
|
MD5 | 519e8506a90fe8c6a8380673e82c7c34 |
|
BLAKE2b-256 | 89b0069171223cb8cf4a91a0700d248db685fab8f46e825642536918dbc0a46c |