Package io.ocfl.api.model
Class StandardDigestAlgorithm
java.lang.Object
io.ocfl.api.model.DigestAlgorithm
io.ocfl.api.model.StandardDigestAlgorithm
Implementation of
DigestAlgorithm
that uses a standard MessageDigest
and encodes the digest value
to a lowercase, hex string.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode
(byte[] value) Encodes a binary digest value into a string representation.Creates a newMessageDigest
that implements the digest algorithmMethods inherited from class io.ocfl.api.model.DigestAlgorithm
equals, fromOcflName, fromOcflName, getJavaStandardName, getOcflName, hashCode, hasJavaStandardName, toString
-
Constructor Details
-
StandardDigestAlgorithm
-
-
Method Details
-
getMessageDigest
Description copied from class:DigestAlgorithm
Creates a newMessageDigest
that implements the digest algorithm- Specified by:
getMessageDigest
in classDigestAlgorithm
- Returns:
- new
MessageDigest
-
encode
Description copied from class:DigestAlgorithm
Encodes a binary digest value into a string representation.- Specified by:
encode
in classDigestAlgorithm
- Parameters:
value
- digest value- Returns:
- the digest value as a string
-