Class Sha256


  • public class Sha256
    extends Object
    SHA-256 hash
    • Method Detail

      • clone

        public Sha256 clone()
        Creates a copy of the Sha256
        Overrides:
        clone in class Object
      • hash

        public long hash()
        Generates a non-cryptographic 64-bit hash of the Sha256.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • eq

        public boolean eq​(Sha256 b)
        Checks if two Sha256s contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • from_bytes

        public static Sha256 from_bytes​(byte[] bytes)
        Constructs a new [`Sha256`] from the given bytes, which are assumed to be the output of a single sha256 hash.