Class ChecksumLookup
- java.lang.Object
-
- com.levigo.jadice.server.util.checksum.ChecksumLookup
-
public final class ChecksumLookup extends Object
Utility class to generate aMessageDigest
with the given algorithm name because CRC32 and Adler32 are not cryptographic digests (and therefore not available viaMessageDigest.getInstance(String)
but sufficient for checksum generation.- Since:
- jadice server 4.3.1.0
- See Also:
MessageDigest
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MessageDigest
getInstance(String algorithm)
Retrieve aMessageDigest
that implements the given algorithm name.
-
-
-
Method Detail
-
getInstance
public static MessageDigest getInstance(String algorithm) throws NoSuchAlgorithmException
Retrieve aMessageDigest
that implements the given algorithm name. In addition toMessageDigest
the following values are allowed:CRC32
- returns a
CRC32Adapter
. Adler32
- returns an
Adler32Adapter
.
- Parameters:
algorithm
- the name of the algorithm requested- Returns:
- a Message Digest object implementing the specified algorithm.
- Throws:
NoSuchAlgorithmException
- if the algorithm is not available in the caller's environment.- See Also:
MessageDigest.getInstance(String)
-
-