Package org.xbill.DNS

Class ZoneMDRecord.Hash

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Reserved.
    static final int
    SHA-384
    static final int
    SHA-512
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    hashLength(int hashAlgorithm)
    Gets the length, in bytes, of the specified hash algorithm.
    static String
    string(int alg)
    Converts an algorithm into its textual representation
    static int
    Converts a textual representation of a hash algorithm into its numeric code.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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.