public interface Nonce
A nonce. Each nonce contains scoops. Each scoop contains a pair of hashes.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddumpInto(FileChannel where, int metadataSize, long offset, long length) Dumps this nonce into the give file, as theoffsetth nonce inside the file.byte[]getValueFor(Challenge challenge) Yields the value of this nonce, for the given challenge.
-
Method Details
-
getValueFor
Yields the value of this nonce, for the given challenge.- Parameters:
challenge- the challenge- Returns:
- the value
-
dumpInto
Dumps this nonce into the give file, as theoffsetth nonce inside the file.- Parameters:
where- the file channel where the nonce must be dumpedmetadataSize- the size of the metadata of the plot file, that precedes the noncesoffset- the progressive number of the nonce inside the file; for instance, if the file will contains nonces from progressive 100 to progressive 150, then they are placed at offsets from 0 to 50 inside the file, respectivelylength- the total number of nonces that will be contained in the file- Throws:
IOException- if the nonce could not be dumped into the file
-