Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/protocol/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ var Crypto = require('crypto');
var Auth = exports;

var sha1;
if (Number(process.version.match(/^v\d+\.(\d+)/)[1]) >= 10){
if (typeof Crypto.createHash.write == 'function') {
sha1 = function(msg) {
var hash = Crypto.createHash('sha1');
hash.setEncoding('binary');
hash.write(msg);
hash.end();
return hash.read();
Expand Down