Package de.uplanet.security
Klasse KeyedSaltedHashing
java.lang.Object
de.uplanet.security.KeyedSaltedHashing
Veraltet.
Intrexx >= 9 uses a PBKDF2 based password storage mechanism.
HMAC Keyed Salted Hashing
This class implements a HMAC keyed and SALTed hashing algorithm. It is closely related to the mechanism described in RFC 2104, HMAC: Keyed-Hashing for Message Authentication. Beyond that, it supports SALT in a way that is compatible with common password storing strategies
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungVeraltet.Contruct the hashing class with SHA-1 as the undelying hashing algorithm.KeyedSaltedHashing(String p_strAlgorithm) Veraltet.Contruct the hashing class with the specified hashing algorithm. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanequals(KeyedSaltedHashing p_another) Veraltet.Do not use this method.byte[]Veraltet.Get the digest.byte[]makeDigest(byte[] p_hashedPassword, byte[] p_message) Veraltet.Create the HMAC.byte[]makeDigest(byte[] p_password, byte[] p_salt, byte[] p_message) Veraltet.Create the HMAC.static booleanverify(byte[] p_response, byte[] p_hashedPassword, byte[] p_challenge) Veraltet.Verify a given client login response using SHA-1 as the hashing algorithm.static booleanVeraltet.Verify a given client login response.
-
Konstruktordetails
-
KeyedSaltedHashing
public KeyedSaltedHashing()Veraltet.Contruct the hashing class with SHA-1 as the undelying hashing algorithm. -
KeyedSaltedHashing
Veraltet.Contruct the hashing class with the specified hashing algorithm.- Löst aus:
NoSuchAlgorithmException- If the algorithm is not available in the caller's environment.
-
-
Methodendetails
-
verify
public static boolean verify(byte[] p_response, byte[] p_hashedPassword, byte[] p_challenge) Veraltet.Verify a given client login response using SHA-1 as the hashing algorithm.This method calls
to calculate the expected response, and then securely compares it with the response given by the client.makeDigest(byte[], byte[])- Parameter:
p_response- The client response.p_hashedPassword- The hashed password.p_challenge- The challenge.- Gibt zurück:
trueif the client's response is correct, orfalseotherwise.
-
verify
public static boolean verify(byte[] p_response, byte[] p_hashedPassword, byte[] p_challenge, String p_strAlgorithm) throws NoSuchAlgorithmException Veraltet.Verify a given client login response.This method calls
to calculate the expected response, and then securely compares it with the response given by the client.makeDigest(byte[], byte[])- Parameter:
p_response- The client response.p_hashedPassword- The hashed password.p_challenge- The challenge.p_strAlgorithm- The hashing algorithm to be used.- Gibt zurück:
trueif the client's response is correct, orfalseotherwise.- Löst aus:
NoSuchAlgorithmException- If the requested hashing algorithm is not available.
-
equals
Veraltet.Do not use this method.Compare the digest of this object with the digest of anotherKeyedSaltedHashing- Parameter:
p_another- Another instance ofKeyedSaltedHashingto compare with.- Gibt zurück:
trueif the two underlying digests are the same or both digest arenull,falseotherwise.
-
makeDigest
public byte[] makeDigest(byte[] p_password, byte[] p_salt, byte[] p_message) throws NullPointerException Veraltet.Create the HMAC.The HMAC is computed from the password, the SALT and the message
- Parameter:
p_password- The plain password as abytearray.p_salt- The SALT as abytearray ornullif SALT should not be used.p_message- The message (e.g. challenge) as abytearray.- Gibt zurück:
- The keyed salted digest.
- Löst aus:
NullPointerException- if the password or the message isnull
-
makeDigest
Veraltet.Create the HMAC.The HMAC is computed from a hashed password-SALT pair and the message
- Parameter:
p_hashedPassword- The hashed and password-SALT-pair as abytearray.p_message- The message (e.g. challenge) as abytearray.- Gibt zurück:
- The HMAC.
- Löst aus:
NullPointerException- ifp_hashedPasswordor the message isnull
-
getDigest
public byte[] getDigest()Veraltet.Get the digest.- Gibt zurück:
- The keyed salted digest or
nullif none is available.
-