Credentials. The Credential class represents an abstract mechanism for checking authentication credentials. A credential instance either represents a secret,
or some data that could only be derived from knowing the secret.

Often a Credential is related to a Password via a one way algorithm, so while a Password itself is a Credential, a UnixCrypt or MD5 digest of a a password is
only a credential that can be checked against the password.

getCredential

Get a credential from a String. If the credential String starts with a known Credential type (eg "CRYPT:" or "MD5:" ) then a Credential of that type is
returned. Otherwise, it tries to find a credential provider whose prefix matches with the start of the credential String. Else the credential is assumed
to be a Password.