Class MathUtils


  • public class MathUtils
    extends Object
    Mathematical utility functions.
    Author:
    Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)
    • 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 to RDFUtils.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