diff --git a/index.js b/index.js index 661c520..1e42093 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var bencode = require('bencode') var BitField = require('bitfield') var EventEmitter = require('events').EventEmitter var inherits = require('inherits') -var sha1 = require('git-sha1') +var sha1 = require('simple-sha1') var MAX_METADATA_SIZE = 10000000 // 10MB var BITFIELD_GROW = 1000 @@ -126,7 +126,7 @@ module.exports = function (metadata) { } catch (err) {} // check hash - if (this._infoHashHex && this._infoHashHex !== sha1(metadata)) { + if (this._infoHashHex && this._infoHashHex !== sha1.sync(metadata)) { return false } diff --git a/package.json b/package.json index b557da6..070bf36 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "dependencies": { "bencode": "^0.6.0", "bitfield": "^1.0.1", - "git-sha1": "^0.1.2", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "simple-sha1": "^2.0.0" }, "devDependencies": { "bittorrent-protocol": "^1.0.0",