From 0e6a4682b823a628fab1a65f72cf225c84f1e035 Mon Sep 17 00:00:00 2001 From: Abbas Mousavi Date: Tue, 3 Apr 2018 18:57:24 +0430 Subject: [PATCH] digest is depricated --- Sources/PostgreSQL/Connection/PostgreSQLConnection.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift b/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift index 40a74b5b..30bd340e 100644 --- a/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift +++ b/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift @@ -114,9 +114,9 @@ public final class PostgreSQLConnection { } // pwdhash = md5(password + username).hexdigest() - let pwdhash = try MD5.digest(passwordData + usernameData).hexEncodedString() + let pwdhash = try MD5.hash(passwordData + usernameData).hexEncodedString() // hash = "md5" + md 5(pwdhash + salt).hexdigest() - let hash = try "md5" + MD5.digest(Data(pwdhash.utf8) + salt).hexEncodedString() + let hash = try "md5" + MD5.hash(Data(pwdhash.utf8) + salt).hexEncodedString() let passwordMessage = PostgreSQLPasswordMessage(password: hash) input = [.password(passwordMessage)]