File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ base64 = "0.13"
1313byteorder = " 1.0"
1414bytes = " 1.0"
1515fallible-iterator = " 0.2"
16- hmac = " 0.11 "
17- md-5 = " 0.9 "
16+ hmac = " 0.12 "
17+ md-5 = " 0.10 "
1818memchr = " 2.0"
1919rand = " 0.8"
20- sha2 = " 0.9 "
20+ sha2 = " 0.10 "
2121stringprep = " 0.1"
Original file line number Diff line number Diff line change 11//! SASL-based authentication support.
22
3- use hmac:: { Hmac , Mac , NewMac } ;
3+ use hmac:: { Hmac , Mac } ;
44use rand:: { self , Rng } ;
55use sha2:: digest:: FixedOutput ;
66use sha2:: { Digest , Sha256 } ;
@@ -275,7 +275,7 @@ impl ScramSha256 {
275275 let mut hmac = Hmac :: < Sha256 > :: new_from_slice ( & server_key)
276276 . expect ( "HMAC is able to accept all key sizes" ) ;
277277 hmac. update ( auth_message. as_bytes ( ) ) ;
278- hmac. verify ( & verifier)
278+ hmac. verify_slice ( & verifier)
279279 . map_err ( |_| io:: Error :: new ( io:: ErrorKind :: InvalidInput , "SCRAM verification error" ) )
280280 }
281281}
Original file line number Diff line number Diff line change 77//! end up in logs pg_stat displays, etc.
88
99use crate :: authentication:: sasl;
10- use hmac:: { Hmac , Mac , NewMac } ;
10+ use hmac:: { Hmac , Mac } ;
1111use md5:: Md5 ;
1212use rand:: RngCore ;
1313use sha2:: digest:: FixedOutput ;
You can’t perform that action at this time.
0 commit comments