Package net.handle.hdllib.trust
Class HandleValueDigester
java.lang.Object
net.handle.hdllib.trust.HandleValueDigester
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondigest
(List<HandleValue> values, String alg) boolean
verify
(DigestedHandleValues digestedValues, List<HandleValue> values) Verifies that the given digests correspond to the given values.
-
Constructor Details
-
HandleValueDigester
public HandleValueDigester()
-
-
Method Details
-
digest
public DigestedHandleValues digest(List<HandleValue> values, String alg) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
verify
public boolean verify(DigestedHandleValues digestedValues, List<HandleValue> values) throws NoSuchAlgorithmException Verifies that the given digests correspond to the given values. Note that the function only verifies exact correspondence; seeHandleVerifier
for methods that deal separately with undigested, digested-but-missing, bad-digest, and verified values.- Parameters:
digestedValues
- the digests to compare.values
- the handle values to compare.- Returns:
- true if the digests and values correspond, otherwise false.
- Throws:
NoSuchAlgorithmException
-