abla/crypto/sha3
Generated from source.
Import with import "abla/crypto/sha3".
Source: abla/crypto/sha3/entry.ab
Keccak (class)
class Keccak(val context: int, val rate: int, val suffix: int, var position: int, var squeezing: bool)
One sponge. rate is the bytes absorbed or squeezed per permutation (168 SHAKE128, 136 SHAKE256 and SHA3-256, 72 SHA3-512); position is where the next byte goes in the current block; suffix is the domain separation of the padding (0x06 SHA-3, 0x1f SHAKE); squeezing is set once the padding is in.
keccakSha3 (fun)
fun keccakSha3(rate: int): Keccak
Returns a SHA-3 sponge with the given rate in bytes.
keccakShake128 (fun)
fun keccakShake128(): Keccak
Returns a SHAKE128 sponge for extendable output.
keccakShake256 (fun)
fun keccakShake256(): Keccak
Returns a SHAKE256 sponge for extendable output.
Keccak.close (extension fun)
trusted fun Keccak.close(): void
Wipes the state and frees it. The sponge can't be used afterwards.
Keccak.absorb (extension fun)
trusted fun Keccak.absorb(data: string): void
Adds the input bytes to the sponge before any output is squeezed.
Keccak.squeeze (extension fun)
trusted fun Keccak.squeeze(count: int): string
Returns the next requested bytes of sponge output, finalizing the input on the first call.
sha3256 (fun)
fun sha3256(input: string): string
SHA3-256 of input, 32 bytes.
sha3512 (fun)
fun sha3512(input: string): string
SHA3-512 of input, 64 bytes.
shake128 (fun)
fun shake128(input: string, size: int): string
SHAKE128 of input, size bytes.
shake256 (fun)
fun shake256(input: string, size: int): string
SHAKE256 of input, size bytes.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.