public final class DigestUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getFingerPrint(Digest d,
byte... buf) |
static String |
getFingerPrint(Digest d,
byte[] buf,
int offset,
int len) |
static String |
getFingerPrint(Digest d,
String s) |
static String |
getFingerPrint(Digest d,
String s,
Charset charset) |
static String |
getFingerPrint(Factory<? extends Digest> f,
byte... buf) |
static String |
getFingerPrint(Factory<? extends Digest> f,
byte[] buf,
int offset,
int len) |
static String |
getFingerPrint(Factory<? extends Digest> f,
String s) |
static String |
getFingerPrint(Factory<? extends Digest> f,
String s,
Charset charset) |
public static String getFingerPrint(Factory<? extends Digest> f, String s) throws Exception
f - The Factory to create the Digest to uses - The String to digest - ignored if null/empty,
otherwise its UTF-8 representation is used as input for the fingerprintnull if null/empty inputException - If failed to calculate the digestgetFingerPrint(Digest, String, Charset)public static String getFingerPrint(Factory<? extends Digest> f, String s, Charset charset) throws Exception
f - The Factory to create the Digest to uses - The String to digest - ignored if null/emptycharset - The Charset to use in order to convert the
string to its byte representation to use as input for the fingerprintnull if null/empty inputException - If failed to calculate the digestpublic static String getFingerPrint(Digest d, String s) throws Exception
d - The Digest to uses - The String to digest - ignored if null/empty,
otherwise its UTF-8 representation is used as input for the fingerprintnull if null/empty inputException - If failed to calculate the digestgetFingerPrint(Digest, String, Charset)public static String getFingerPrint(Digest d, String s, Charset charset) throws Exception
d - The Digest to uses - The String to digest - ignored if null/emptycharset - The Charset to use in order to convert the
string to its byte representation to use as input for the fingerprintnull if null/empty inputException - If failed to calculate the digestpublic static String getFingerPrint(Factory<? extends Digest> f, byte... buf) throws Exception
f - The Factory to create the Digest to usebuf - The data buffer to be fingerprint-ednull if empty data bufferException - If failed to calculate the fingerprintgetFingerPrint(Factory, byte[], int, int)public static String getFingerPrint(Factory<? extends Digest> f, byte[] buf, int offset, int len) throws Exception
f - The Factory to create the Digest to usebuf - The data buffer to be fingerprint-edoffset - The offset of the data in the bufferlen - The length of data - ignored if non-positivenull if non-positive lengthException - If failed to calculate the fingerprintpublic static String getFingerPrint(Digest d, byte... buf) throws Exception
d - The Digest to usebuf - The data buffer to be fingerprint-ednull if empty data bufferException - If failed to calculate the fingerprintgetFingerPrint(Digest, byte[], int, int)Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.