Class MessageDigestValue

  • All Implemented Interfaces:
    com.helger.commons.io.IHasByteArray, com.helger.commons.io.IHasInputStream, com.helger.commons.io.IHasInputStreamAndReader, com.helger.commons.lang.IHasSize

    @Immutable
    public class MessageDigestValue
    extends Object
    implements com.helger.commons.io.IHasByteArray
    Represents a single message digest value as the combination of the algorithm and the digest bytes.
    Author:
    Philip Helger
    • Field Detail

    • Method Detail

      • isCopy

        public boolean isCopy()
        Specified by:
        isCopy in interface com.helger.commons.io.IHasByteArray
      • bytes

        @Nonnull
        @Nonempty
        @ReturnsMutableObject
        public byte[] bytes()
        Specified by:
        bytes in interface com.helger.commons.io.IHasByteArray
        Returns:
        The message digest bytes. The length depends on the used algorithm. Never null.
        Since:
        9.1.3
      • size

        @Nonnegative
        public int size()
        Specified by:
        size in interface com.helger.commons.lang.IHasSize
      • getOffset

        @Nonnegative
        public int getOffset()
        Specified by:
        getOffset in interface com.helger.commons.io.IHasByteArray
      • getHexEncodedDigestString

        @Nonnull
        @Nonempty
        public String getHexEncodedDigestString()
        Returns:
        The hex-encoded String of the message digest bytes. Never null.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object