Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3766d9

Browse files
author
Dave Cramer
committed
applied patch to fix encoding bug supplied by Jun Kawai
1 parent369e2b6 commitb3766d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/interfaces/jdbc/org/postgresql/util/MD5Digest.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* MD5-based utility function to obfuscate passwords before network transmission
55
*
66
* @author Jeremy Wohl
7-
* $Id: MD5Digest.java,v 1.3 2001/11/25 23:26:59 barry Exp $
7+
* $Id: MD5Digest.java,v 1.4 2002/08/16 19:35:46 davec Exp $
88
*/
99

1010
importjava.security.*;
@@ -21,11 +21,11 @@ private MD5Digest()
2121
*
2222
* @param userThe connecting user.
2323
* @param passwordThe connecting user's password.
24-
* @param saltA four-character string sent by the server.
24+
* @param saltA four-salt sent by the server.
2525
*
2626
* @returnA 35-byte array, comprising the string "md5" and an MD5 digest.
2727
*/
28-
publicstaticbyte[]encode(Stringuser,Stringpassword,Stringsalt)
28+
publicstaticbyte[]encode(Stringuser,Stringpassword,byte []salt)
2929
{
3030
MessageDigestmd;
3131
byte[]temp_digest,pass_digest;
@@ -41,7 +41,7 @@ public static byte[] encode(String user, String password, String salt)
4141

4242
bytesToHex(temp_digest,hex_digest,0);
4343
md.update(hex_digest,0,32);
44-
md.update(salt.getBytes());
44+
md.update(salt);
4545
pass_digest =md.digest();
4646

4747
bytesToHex(pass_digest,hex_digest,3);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp