mirror of
https://github.com/emn178/js-sha1.git
synced 2026-08-13 04:21:35 +08:00
* Support ArrayBuffer input.
* Improve performance.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user