Package com.emc.documentum.rest.common.key

# Class KeyGen

java.lang.Object
com.emc.documentum.rest.common.key.KeyGen

public final class KeyGen extends Object
An utility to make keys and digests for input objects.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `makeDigest(Object... input)`
  Make a digest for input objects.
  `static String`
  `makeGenericCacheKey(Object... input)`
  Make a distinct key for input objects.
  `static String`
  `makeUserCacheKey(String repositoryName, String user, Object password, Object... misc)`
  Make a distinct key for input credential.
  `static String`
  `md5Encode(Object password)`
  Make a MD5 digest for a password object.

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

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

- ## Method Details

  - ### makeUserCacheKey

    public static String makeUserCacheKey(String repositoryName, String user, Object password, Object... misc)
    Make a distinct key for input credential. The key text may expose the plain text of the original input except the password.
    Parameters:
      `repositoryName` - the repository name
      `user` - the user login name
      `password` - the user password
      `misc` - other login parameters
    Returns:
      the key text

  - ### makeGenericCacheKey

    public static String makeGenericCacheKey(Object... input)
    Make a distinct key for input objects. The key text may expose the plain text of the origin input.
    Parameters:
      `input` - objects to make the key
    Returns:
      the key text

  - ### makeDigest

    public static String makeDigest(Object... input)
    Make a digest for input objects.
    Parameters:
      `input` - objects to make the digest
    Returns:
      digest text

  - ### md5Encode

    public static String md5Encode(Object password)
    Make a MD5 digest for a password object.
    Parameters:
      `password` - password object
    Returns:
      MD5 digest text