Sha256MetaData

class Sha256MetaData @JvmOverloads constructor(val world: Int, val difficulty: Int = 18, val epochTimeMillis: Long = System.currentTimeMillis(), val version: Int = 1) : ChallengeMetaData

The SHA-256 metadata is what the default SHA-256 implementation requires in order to construct new challenges.

Constructors

Link copied to clipboard
constructor(world: Int, difficulty: Int = 18, epochTimeMillis: Long = System.currentTimeMillis(), version: Int = 1)

Properties

Link copied to clipboard
val difficulty: Int = 18

the difficulty of the challenge, which is the number of leading zero bits that the hash must have for it to be considered successful.

Link copied to clipboard

the epoch time milliseconds when the request was made. This value is the very first section of the hash input.

Link copied to clipboard
val version: Int = 1

the version of hashcash to use, only 1 is supported.

Link copied to clipboard
val world: Int

the world that the client is connecting to. The world id is the second argument to the string that will be hashed.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String