Interface Nonce


public interface Nonce
A nonce. Each nonce contains scoops. Each scoop contains a pair of hashes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dumpInto(FileChannel where, int metadataSize, long offset, long length)
    Dumps this nonce into the give file, as the offsetth nonce inside the file.
    byte[]
    Yields the value of this nonce, for the given challenge.
  • Method Details

    • getValueFor

      byte[] getValueFor(Challenge challenge)
      Yields the value of this nonce, for the given challenge.
      Parameters:
      challenge - the challenge
      Returns:
      the value
    • dumpInto

      void dumpInto(FileChannel where, int metadataSize, long offset, long length) throws IOException
      Dumps this nonce into the give file, as the offsetth nonce inside the file.
      Parameters:
      where - the file channel where the nonce must be dumped
      metadataSize - the size of the metadata of the plot file, that precedes the nonces
      offset - 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, respectively
      length - the total number of nonces that will be contained in the file
      Throws:
      IOException - if the nonce could not be dumped into the file