Package org.cdlib.mrt.core
Class MessageDigest
java.lang.Object
org.cdlib.mrt.core.MessageDigest
- All Implemented Interfaces:
Serializable
,StateStringInf
Conainer for a Message Digest including checksum type and checksum value
- Author:
- dloy
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageDigest
(String value, String algorithmS) Constructor This form of the constructor requires a supported form of the checksum type after normalization.MessageDigest
(String value, MessageDigestType algorithm) Constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(MessageDigest in) Matches one message digest against anotherReturn checksum typestatic MessageDigestType
getAlgorithm
(String algorithmS) Return checksum type as used by JavagetValue()
Return checksum valuestatic void
void
setDebugDump
(boolean debugDump) toString()
-
Field Details
-
value
-
algorithm
-
debugDump
protected boolean debugDump
-
-
Constructor Details
-
MessageDigest
Constructor- Parameters:
value
- checksum valuealgorithm
- checksum type- Throws:
TException
-
MessageDigest
Constructor This form of the constructor requires a supported form of the checksum type after normalization. If no supported form is found then a runtime exception is thrown- Parameters:
value
- checksum valuealgorithmS
- String form of checksum type- Throws:
TException
-
-
Method Details
-
setDebugDump
public void setDebugDump(boolean debugDump) -
getAlgorithm
-
getValue
Return checksum value- Returns:
- checksum value
-
getAlgorithm
Return checksum type- Returns:
- checksum type
-
getJavaAlgorithm
Return checksum type as used by Java- Returns:
- Java checksum type
-
equals
Matches one message digest against another- Parameters:
in
- message digest to be matched against this message digest- Returns:
- true=match, false=no match
-
toString
-
main
-