diff --git a/.travis.yml b/.travis.yml index 12b2631..56c2d58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: node_js node_js: - - 0.8 - - 0.6 + - 4 + - 5 + - 6 diff --git a/lib/multipass.js b/lib/multipass.js index a96e973..d9edaba 100644 --- a/lib/multipass.js +++ b/lib/multipass.js @@ -8,7 +8,7 @@ var api = module.exports = function(apiKey, siteKey) { if (!(this instanceof api)) return new api(apiKey, siteKey); if (!(typeof apiKey == 'string' && apiKey.length > 0)) throw new Error('Invalid API key'); if (!(typeof siteKey == 'string' && siteKey.length > 0)) throw new Error('Invalid site key'); - this._key = crypto.createHash('sha1').update(apiKey + siteKey).digest('binary').substring(0, BLOCK_SIZE); + this._key = crypto.createHash('sha1').update(apiKey + siteKey).digest().slice(0, BLOCK_SIZE); this._iv = new Buffer('OpenSSL for Ruby', 'ascii'); return this; };