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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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`