* Support ArrayBuffer input.

* Improve performance.
This commit is contained in:
Chen Yi-Cyuan
2015-03-04 21:16:06 +08:00
parent 2f22f6285d
commit 731295e355
7 changed files with 42 additions and 20 deletions
+7
View File
@@ -56,5 +56,12 @@
expect(sha1(new Uint8Array([]))).to.be('da39a3ee5e6b4b0d3255bfef95601890afd80709');
});
});
describe('ArrayBuffer', function() {
it('should be successful', function() {
expect(sha1(new ArrayBuffer(0))).to.be('da39a3ee5e6b4b0d3255bfef95601890afd80709');
expect(sha1(new ArrayBuffer(1))).to.be('5ba93c9db0cff93f52b521d7420e43f6eda2784f');
});
});
});
})(sha1);