org.appng.core.security

## Class DigestUtil

- java.lang.Object
- - org.appng.core.security.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 .
  Author:
    Matthias Herlitzius, Matthias Müller
  See Also:
    `DigestValidator`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DigestUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getDigest(String username, String sharedSecret)` Creates and returns a digest.

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

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

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

Copyright © 2011–2023 aiticon GmbH. All rights reserved.