Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
b3766d9f
Commit
b3766d9f
authored
22 years ago
by
Dave Cramer
Browse files
Options
Downloads
Patches
Plain Diff
applied patch to fix encoding bug supplied by Jun Kawai
parent
369e2b6a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/interfaces/jdbc/org/postgresql/util/MD5Digest.java
+4
-4
4 additions, 4 deletions
src/interfaces/jdbc/org/postgresql/util/MD5Digest.java
with
4 additions
and
4 deletions
src/interfaces/jdbc/org/postgresql/util/MD5Digest.java
+
4
−
4
View file @
b3766d9f
...
@@ -4,7 +4,7 @@ package org.postgresql.util;
...
@@ -4,7 +4,7 @@ package org.postgresql.util;
* MD5-based utility function to obfuscate passwords before network transmission
* MD5-based utility function to obfuscate passwords before network transmission
*
*
* @author Jeremy Wohl
* @author Jeremy Wohl
* $Id: MD5Digest.java,v 1.
3
200
1/11/25 23:26:59 barry
Exp $
* $Id: MD5Digest.java,v 1.
4
200
2/08/16 19:35:46 davec
Exp $
*/
*/
import
java.security.*
;
import
java.security.*
;
...
@@ -21,11 +21,11 @@ public class MD5Digest
...
@@ -21,11 +21,11 @@ public class MD5Digest
*
*
* @param user The connecting user.
* @param user The connecting user.
* @param password The connecting user's password.
* @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.
* @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
;
MessageDigest
md
;
byte
[]
temp_digest
,
pass_digest
;
byte
[]
temp_digest
,
pass_digest
;
...
@@ -41,7 +41,7 @@ public class MD5Digest
...
@@ -41,7 +41,7 @@ public class MD5Digest
bytesToHex
(
temp_digest
,
hex_digest
,
0
);
bytesToHex
(
temp_digest
,
hex_digest
,
0
);
md
.
update
(
hex_digest
,
0
,
32
);
md
.
update
(
hex_digest
,
0
,
32
);
md
.
update
(
salt
.
getBytes
()
);
md
.
update
(
salt
);
pass_digest
=
md
.
digest
();
pass_digest
=
md
.
digest
();
bytesToHex
(
pass_digest
,
hex_digest
,
3
);
bytesToHex
(
pass_digest
,
hex_digest
,
3
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment