Class MappingHasher

java.lang.Object
org.incenp.obofoundry.sssom.MappingHasher

public class MappingHasher extends Object
Creates deterministic hash values from mappings.
  • Constructor Details

    • MappingHasher

      public MappingHasher()
      Creates a new instance.
  • Method Details

    • hash

      public String hash(Mapping mapping)
      Hashes the given mapping using the SSSOM standard hash procedure.
      Parameters:
      mapping - The mapping to hash.
      Returns:
      The unique hash for the mapping.
    • toZBase32

      public static String toZBase32(byte[] digest)
      Encodes a buffer into its Z-Base32 string representation.

      This method implements the Z-Base32 encoding as defined in RFC 6189 ยง5.1.6 and human-oriented base32 encoding.

      Parameters:
      digest - The input buffer to encode.
      Returns:
      The Z-Base32-encoded string representation of the input buffer.