Package net.i2p.data

Class Hash

All Implemented Interfaces:
DataStructure
Direct Known Subclasses:
LocalHash, Peer

public class Hash extends SimpleDataStructure
Defines the hash as defined by the I2P data structure spec. A hash is the SHA-256 of some data, taking up 32 bytes.
Author:
jrandom
  • Field Details

    • HASH_LENGTH

      public static final int HASH_LENGTH
      See Also:
    • FAKE_HASH

      public static final Hash FAKE_HASH
  • Constructor Details

    • Hash

      public Hash()
    • Hash

      public Hash(byte[] data)
      Throws:
      IllegalArgumentException - if data is not 32 bytes (null is ok)
  • Method Details