No description
Find a file
theAkito 7e1a519466
Fix all the deprecated units (#1)
* Fix all the deprecated units

All the errors fixed here can be backtracked,
to some change made to the Nim compiler,
many years ago.

Example:
3546ff8819

* 0.7 Bump Version
2021-05-31 08:54:56 +02:00
.gitignore Fix all the deprecated units (#1) 2021-05-31 08:54:56 +02:00
kangaroo-K12.rsp init commit 2019-08-26 09:00:36 +02:00
LICENSE init commit 2019-08-26 09:00:36 +02:00
README.md init commit 2019-08-26 09:00:36 +02:00
sha3.nim Fix all the deprecated units (#1) 2021-05-31 08:54:56 +02:00
sha3.nimble Fix all the deprecated units (#1) 2021-05-31 08:54:56 +02:00
SHA3_224LongMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHA3_224ShortMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHA3_256LongMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHA3_256ShortMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHA3_384LongMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHA3_384ShortMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHA3_512LongMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHA3_512ShortMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHAKE128LongMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHAKE128ShortMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHAKE256LongMsg.rsp init commit 2019-08-26 09:00:36 +02:00
SHAKE256ShortMsg.rsp init commit 2019-08-26 09:00:36 +02:00

SHA3 library. Two ways:

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))

Enum type for implemention: SHA3_224, SHA3_256, SHA3_384, SHA3_512, SHA3_SHAKE128, SHA3_SHAKE256.

Since version "0.6" there is KangarooTwelve implementation:

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")

Tests over vectors are included.