Package org.apache.any23.util
Class MathUtils
- java.lang.Object
-
- org.apache.any23.util.MathUtils
-
public class MathUtils extends Object
Mathematical utility functions.- Author:
- Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
md5(String s)
Create a MD5 weak hash for a given string.
-
-
-
Method Detail
-
md5
public static final String md5(String s)
Create a MD5 weak hash for a given string.
N.B. This method MUST never be used in a sensitive context. Examples of such usage include (i) User-password storage, (ii) Security token generation (used to confirm e-mail when registering on a website, reset password, etc...), (iii) To compute some message integrity.
Current usage is limited toRDFUtils.getBNode(String)
which is fine for the creation of blank node(s).- Parameters:
s
- input string to create an MD5 hash for.- Returns:
- a string representation of a MD5
MessageDigest
-
-