HashOutputStream

Outputs a stream of bytes for the Keccak Hash Functions with methods to substitute as a CSPRNG.

Author

Ron Lauren Hombre

Since

2.0.0

Properties

Link copied to clipboard
@get:JvmName(name = "getParameter")
val PARAMETER: KeccakParameter

The KeccakParameter used to generate the hash stream.

Functions

Link copied to clipboard

Returns true if the KeccakParameter allows more bytes to output.

Link copied to clipboard

Returns a Boolean using a full byte from the hash stream.

Link copied to clipboard
fun nextByte(): Byte

Returns the next byte from the hash stream.

Link copied to clipboard
fun nextBytes(destination: ByteArray)

Copies bytes from the hash stream into the byte array.

fun nextBytes(length: Int): ByteArray

Returns a byte array from the hash stream.

fun nextBytes(destination: ByteArray, length: Int, offset: Int)

Copies bytes from the hash stream into a part of the byte array.

Link copied to clipboard

Returns a Double made up of eight bytes from the hash stream.

Link copied to clipboard

Returns a Float made up of four bytes from the hash stream.

Link copied to clipboard
fun nextInt(): Int

Returns an Int made up of four bytes from the hash stream.

Link copied to clipboard
fun nextLong(): Long

Returns a Long made up of eight bytes from the hash stream.

Link copied to clipboard

Returns a Short made up of two bytes from the hash stream.