diff options
author | Martin Ritchie <ritchiem@apache.org> | 2007-04-12 09:11:19 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2007-04-12 09:11:19 +0000 |
commit | 8db39dc54b357436697fe17da5676c14a2d21486 (patch) | |
tree | 793fc4ab5e21f706887d486e4a82c6bad9be5465 | |
parent | 04ba6cf5031129241d298499d04c5d4a822b0b6d (diff) | |
download | qpid-python-8db39dc54b357436697fe17da5676c14a2d21486.tar.gz |
QPID-446 Removed hashing of presented password in Base64MD5PasswordFilePrincipalDatabase.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@527848 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java index b1281633ec..956db64d90 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java +++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java @@ -599,7 +599,7 @@ public class Base64MD5PasswordFilePrincipalDatabase implements PrincipalDatabase private void encodePassword() throws EncoderException, UnsupportedEncodingException, NoSuchAlgorithmException { Base64 b64 = new Base64(); - _encodedPassword = b64.encode(getHash(new String(_password))); + _encodedPassword = b64.encode(new String(_password).getBytes(DEFAULT_ENCODING)); } public boolean isModified() @@ -622,18 +622,5 @@ public class Base64MD5PasswordFilePrincipalDatabase implements PrincipalDatabase _modified = false; } - private byte[] getHash(String text) throws NoSuchAlgorithmException, UnsupportedEncodingException - { - byte[] data = text.getBytes(DEFAULT_ENCODING); - - MessageDigest md = MessageDigest.getInstance("MD5"); - - for (byte b : data) - { - md.update(b); - } - - return md.digest(); - } } } |