Class DescriptorUtils

java.lang.Object
org.torproject.metrics.descriptorparser.utils.DescriptorUtils

public class DescriptorUtils extends Object
  • Constructor Details

    • DescriptorUtils

      public DescriptorUtils()
  • Method Details

    • fieldAsString

      public String fieldAsString(Object field)
      Return a string representation of an object.
    • listToArray

      public Object[] listToArray(List listArray)
      Convert a list to array object.
    • calculateDigestSha256Base64

      public String calculateDigestSha256Base64(byte[] rawDescriptorBytes) throws org.torproject.descriptor.DescriptorParseException
      Calculate a SHA-256 digest of a descriptor and return its representation in Base64.
      Throws:
      org.torproject.descriptor.DescriptorParseException