sha3
sha3 - cryptographic hash function
Summary
| Latest Version | Unknown |
|---|---|
| License | CC0 |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install sha3
choosenim install sha3
git clone https://github.com/nim-community/sha3
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| sha3 | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/nim-community/sha3 |
|---|---|
| Homepage | https://github.com/nim-community/sha3 |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
SHA3 Library
A comprehensive SHA3 implementation for Nim, supporting all SHA3 variants and KangarooTwelve.
Features
- SHA3 Variants: SHA3_224, SHA3_256, SHA3_384, SHA3_512, SHA3_SHAKE128, SHA3_SHAKE256
- KangarooTwelve: Fast hashing algorithm (available since v0.6)
- Comprehensive Testing: Extensive test suite with official test vectors
- Easy to Use: Simple API for both incremental and one-shot hashing
Installation
nimble install sha3
Usage
Basic SHA3 Hashing
import sha3
var ctx: SHA3
sha3_init(ctx, SHA3_224, 4)
sha3_update(ctx, "a", 1)
sha3_update(ctx, "b", 1)
sha3_update(ctx, "c", 1)
assert(getSHA3(SHA3_224, "abc", 4) == $sha3_final(ctx))
KangarooTwelve
Since version 0.6, KangarooTwelve is supported:
import sha3
var ktx: Kangaroo12
sha3_init(ktx, 8, "keykey", 6)
sha3_update(ktx, "Mike", 4)
assert($sha3_final(ktx) == "285f85b139eb449b")
assert(getSHA3("Kangaroo12 is fast", 5) == "d793340e68")
License
This project is released under the CC0 License - public domain dedication.