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

    Modifier and Type
    Method
    Description
    Returns the algorithm end result as string, never null.
    void
    Updates the checksum algorithm inner state with input.
  • Method Details

    • update

      void update(ByteBuffer input)
      Updates the checksum algorithm inner state with input.
    • 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.