Class DescriptorUtils
java.lang.Object
org.torproject.metrics.descriptorparser.utils.DescriptorUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateDigestSha256Base64
(byte[] rawDescriptorBytes) Calculate a SHA-256 digest of a descriptor and return its representation in Base64.fieldAsString
(Object field) Return a string representation of an object.Object[]
listToArray
(List listArray) Convert a list to array object.
-
Constructor Details
-
DescriptorUtils
public DescriptorUtils()
-
-
Method Details
-
fieldAsString
Return a string representation of an object. -
listToArray
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
-