mirror of
https://github.com/emn178/js-sha1.git
synced 2026-08-12 20:11:36 +08:00
### Added
- TypeScript interfaces. #6, #9 - HMAC feature. - support for web worker. #14 ### Fixed - deprecated `new Buffer`, replace with `Buffer.from`. #10 - dependencies and security issues. - refactor: simplify formatMessage internal logic. - Generates incorrect hash in some cases. ### Changed - remove `eval` and use `require` directly. #8 - throw error by Error oject. - throw error if update after finalize - use unsigned right shift.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>SHA1</title>
|
||||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
|
||||
<script src="../node_modules/mocha/mocha.js"></script>
|
||||
<script src="../node_modules/expect.js/index.js"></script>
|
||||
<script src="../node_modules/requirejs/require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
require(['../src/sha1.js'], function (sha1) {
|
||||
window.sha1 = sha1;
|
||||
require(['test.js', 'hmac-test.js'], function () {
|
||||
mocha.checkLeaks();
|
||||
mocha.run();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user