[Pkg-javascript-commits] [node-sha.js] 85/237: compute correct length for binary string
Bastien Roucariès
rouca at moszumanska.debian.org
Fri May 5 09:03:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-sha.js.
commit c616d7435493c67d399954d8b5673691b5405e83
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Mon Jan 6 16:23:51 2014 +0700
compute correct length for binary string
---
hash.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hash.js b/hash.js
index 11fc0c7..c860065 100644
--- a/hash.js
+++ b/hash.js
@@ -17,7 +17,7 @@ function Hash (blockSize, finalSize) {
function lengthOf(data, enc) {
if(enc == null) return data.byteLength || data.length
- if(enc == 'ascii') return data.length
+ if(enc == 'ascii' || enc == 'binary') return data.length
if(enc == 'hex') return data.length/2
if(enc == 'base64') return data.length/3
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git
More information about the Pkg-javascript-commits
mailing list