Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b3766d9f
Commit
b3766d9f
authored
Aug 16, 2002
by
Dave Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
applied patch to fix encoding bug supplied by Jun Kawai
parent
369e2b6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/interfaces/jdbc/org/postgresql/util/MD5Digest.java
src/interfaces/jdbc/org/postgresql/util/MD5Digest.java
+4
-4
No files found.
src/interfaces/jdbc/org/postgresql/util/MD5Digest.java
View file @
b3766d9f
...
...
@@ -4,7 +4,7 @@ package org.postgresql.util;
* MD5-based utility function to obfuscate passwords before network transmission
*
* @author Jeremy Wohl
* $Id: MD5Digest.java,v 1.
3 2001/11/25 23:26:59 barry
Exp $
* $Id: MD5Digest.java,v 1.
4 2002/08/16 19:35:46 davec
Exp $
*/
import
java.security.*
;
...
...
@@ -21,11 +21,11 @@ public class MD5Digest
*
* @param user The connecting user.
* @param password The connecting user's password.
* @param salt A four-
character string
sent by the server.
* @param salt A four-
salt
sent by the server.
*
* @return A 35-byte array, comprising the string "md5" and an MD5 digest.
*/
public
static
byte
[]
encode
(
String
user
,
String
password
,
String
salt
)
public
static
byte
[]
encode
(
String
user
,
String
password
,
byte
[]
salt
)
{
MessageDigest
md
;
byte
[]
temp_digest
,
pass_digest
;
...
...
@@ -41,7 +41,7 @@ public class MD5Digest
bytesToHex
(
temp_digest
,
hex_digest
,
0
);
md
.
update
(
hex_digest
,
0
,
32
);
md
.
update
(
salt
.
getBytes
()
);
md
.
update
(
salt
);
pass_digest
=
md
.
digest
();
bytesToHex
(
pass_digest
,
hex_digest
,
3
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment