Class DigestUtil


  • public class DigestUtil
    extends Object
    Utility class to generate a digest of the form <user>|<yyyyMMddHHmmss>|<utc-offset>|<hash>.
    Example:
    admin|20160114120555|+01:00|1D87C8A5E738BD3015AC57F2D9B862A5
    The <hash> is a MD5 hash of <user>|<timestamp>|<utc-offset>|<shared-secret> , where <shared-secret> comes from the platform property "sharedSecret".
    Author:
    Matthias Herlitzius, Matthias Müller
    See Also:
    DigestValidator
    • Constructor Detail

      • DigestUtil

        public DigestUtil()
    • Method Detail

      • getDigest

        public static String getDigest​(String username,
                                       String sharedSecret)
        Creates and returns a digest.
        Parameters:
        username - the username
        sharedSecret - the shared secret
        Returns:
        the digest