Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spark-md5 to version 2.0.0 πŸš€ #4529

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
16 changes: 1 addition & 15 deletions lib/deps/md5-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,8 @@ var Md5 = require('spark-md5');
var setImmediateShim = global.setImmediate || global.setTimeout;
var MD5_CHUNK_SIZE = 32768;

// convert a 64-bit int to a binary string
function intToString(int) {
return String.fromCharCode(int & 0xff) +
String.fromCharCode((int >>> 8) & 0xff) +
String.fromCharCode((int >>> 16) & 0xff) +
String.fromCharCode((int >>> 24) & 0xff);
}

// convert an array of 64-bit ints into
// a base64-encoded string
function rawToBase64(raw) {
var res = '';
for (var i = 0, len = raw.length; i < len; i++) {
res += intToString(raw[i]);
}
return base64.btoa(res);
return base64.btoa(raw);
}

function appendBuffer(buffer, data, start, end) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"pouchdb-collate": "1.2.0",
"pouchdb-collections": "1.0.1",
"request": "2.65.0",
"spark-md5": "1.0.0",
"spark-md5": "2.0.0",
"through2": "2.0.0",
"vuvuzela": "1.0.1"
},
Expand Down