Interface ChecksumAlgorithm


  • public interface ChecksumAlgorithm
    Implementation performing checksum calculation for specific algorithm. Instances of this interface are stateful, non-thread safe, and should not be reused.
    Since:
    1.8.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String checksum()
      Returns the algorithm end result as string, never null.
      void update​(java.nio.ByteBuffer input)
      Updates the checksum algorithm inner state with input.
    • Method Detail

      • update

        void update​(java.nio.ByteBuffer input)
        Updates the checksum algorithm inner state with input.
      • checksum

        java.lang.String checksum()
        Returns the algorithm end result as string, never null. After invoking this method, this instance should be discarded and not reused. For new checksum calculation you have to get new instance. Values returned by this method are handled as "opaque strings", and are used for simple equality checks (matches or not matches the checksum), and are also persisted in this form (locally to file system but also uploaded as checksum files). Resolver itself never tries to "decode" or "interpret" this string in any other way.