Module methanol

Interface DiskStore.Hasher

All Known Implementing Classes:
MockHasher
Enclosing class:
DiskStore
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface DiskStore.Hasher
A function that computes an 80-bit hash from a string key.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DiskStore.Hasher
    A Hasher returning the first 80 bits of the SHA-256 of the key's UTF-8 encoded bytes.
  • Method Summary

    Modifier and Type
    Method
    Description
    hash(String key)
     
  • Field Details

    • TRUNCATED_SHA_256

      static final DiskStore.Hasher TRUNCATED_SHA_256
      A Hasher returning the first 80 bits of the SHA-256 of the key's UTF-8 encoded bytes.
  • Method Details