ChallengeType

A common binding interface for challenge types. Currently, the client only supports SHA-256 as a challenge, but it is set up to support other types with ease.

Parameters

MetaData

the metadata necessary to construct a challenge of this type.

Inheritors

Properties

Link copied to clipboard
abstract val id: Int

the id of the challenge, used by the client to identify what challenge solver to use.

Functions

Link copied to clipboard
abstract fun encode(buffer: JagByteBuf)

A function to encode the given challenge into the byte buffer that the client expects. The role of encoding is moved over to the implementation as the server can provide its own implementations, should the client support any.

Link copied to clipboard
abstract fun estimateMessageSize(): Int

Estimates the size of the message, allowing Netty to accurately track the number of bytes writing it would require.