net.handle.hdllib.trust
Class HandleValueDigester

java.lang.Object
  extended by net.handle.hdllib.trust.HandleValueDigester

public class HandleValueDigester
extends java.lang.Object


Constructor Summary
HandleValueDigester()
           
 
Method Summary
 DigestedHandleValues digest(java.util.List<HandleValue> values, java.lang.String alg)
           
 boolean verify(DigestedHandleValues digestedValues, java.util.List<HandleValue> values)
          Verifies that the given digests correspond to the given values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandleValueDigester

public HandleValueDigester()
Method Detail

digest

public DigestedHandleValues digest(java.util.List<HandleValue> values,
                                   java.lang.String alg)
                            throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

verify

public boolean verify(DigestedHandleValues digestedValues,
                      java.util.List<HandleValue> values)
               throws java.security.NoSuchAlgorithmException
Verifies that the given digests correspond to the given values. Note that the function only verifies exact correspondence; see HandleVerifier 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:
java.security.NoSuchAlgorithmException