Package org.xipki.security
Class FpIdCalculator
- java.lang.Object
-
- org.xipki.security.FpIdCalculator
-
public class FpIdCalculator extends Object
MD'5 Fingerprint calculator.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longhash(byte[] data)Hash the data and returns the first 8 bytes of the hash value.static longhash(String data)Hash the data.getBytes("UTF-8") and returns the first 8 bytes of the hash value.
-
-
-
Method Detail
-
hash
public static long hash(String data)
Hash the data.getBytes("UTF-8") and returns the first 8 bytes of the hash value.- Parameters:
data- data over which the hash value is calculated.- Returns:
- long represented of the first 8 bytes
-
hash
public static long hash(byte[] data)
Hash the data and returns the first 8 bytes of the hash value.- Parameters:
data- data over which the hash value is calculated.- Returns:
- long represented of the first 8 bytes
-
-