File tree 3 files changed +7
-23
lines changed
3 files changed +7
-23
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ you spot any mistakes.
7
7
## HEAD
8
8
9
9
* fix authentication w/password failure for node.js 0.10.5 #746 #752
10
- * fix authentication w/password TypeError exception for node.js 0.10.0-0.10.4
10
+ * fix authentication w/password TypeError exception for node.js 0.10.0-0.10.4 # 747
11
11
* fix specifying ` values ` in ` conn.query({...}).on(...) ` pattern #755
12
12
* fix long stack trace to include the ` pool.query(...) ` call #715
13
13
Original file line number Diff line number Diff line change 1
1
var Buffer = require ( 'buffer' ) . Buffer ;
2
2
var Crypto = require ( 'crypto' ) ;
3
3
var Auth = exports ;
4
- var semver = require ( 'semver' ) ;
5
-
6
- var sha1 ;
7
- if ( semver . gt ( process . version , '0.10.5' ) ) {
8
- // support node.js > 0.10.5
9
- // new interface in node.js 0.10, but exclude < 0.10.5 due to core bugs
10
- sha1 = function ( msg ) {
11
- var hash = Crypto . createHash ( 'sha1' ) ;
12
- hash . setEncoding ( 'binary' ) ;
13
- hash . write ( msg ) ;
14
- hash . end ( ) ;
15
- return hash . read ( ) ;
16
- }
17
- } else {
18
- sha1 = function ( msg ) {
19
- var hash = Crypto . createHash ( 'sha1' ) ;
20
- hash . update ( msg ) ;
21
- // hash.digest() does not output buffers yet
22
- return hash . digest ( 'binary' ) ;
23
- }
4
+
5
+ function sha1 ( msg ) {
6
+ var hash = Crypto . createHash ( 'sha1' ) ;
7
+ hash . update ( msg , 'binary' ) ;
8
+ return hash . digest ( 'binary' ) ;
24
9
}
25
10
Auth . sha1 = sha1 ;
26
11
Original file line number Diff line number Diff line change 18
18
"dependencies" : {
19
19
"require-all" : " 0.0.3" ,
20
20
"bignumber.js" : " 1.0.1" ,
21
- "readable-stream" : " ~1.1.9" ,
22
- "semver" : " 2.2.1"
21
+ "readable-stream" : " ~1.1.9"
23
22
},
24
23
"devDependencies" : {
25
24
"utest" : " 0.0.6" ,
You can’t perform that action at this time.
0 commit comments