Package org.xbill.DNS

Class ZoneMDRecord.Hash

java.lang.Object
org.xbill.DNS.ZoneMDRecord.Hash
Enclosing class:
ZoneMDRecord

public static class ZoneMDRecord.Hash extends Object
ZONEMD Hash Algorithms.
See Also:
  • Field Details

  • Constructor Details

    • Hash

      public Hash()
  • Method Details

    • string

      public static String string(int alg)
      Converts an algorithm into its textual representation
    • value

      public static int value(String s)
      Converts a textual representation of a hash algorithm into its numeric code. Integers in the range 0..255 are also accepted.
      Parameters:
      s - The textual representation of the hash algorithm.
      Returns:
      The algorithm code, or -1 for an unknown hash algorithm.
    • hashLength

      public static int hashLength(int hashAlgorithm)
      Gets the length, in bytes, of the specified hash algorithm.
      Returns:
      The length, in bytes, or -1 for an unknown hash algorithm.