mirror of
https://github.com/emn178/js-sha3.git
synced 2026-08-12 19:41:36 +08:00
- AMD support. - support for web worker. #13 Changed - throw error if input type is incorrect when cSHAKE and KMAC. - freeze hash after finalize.
13 lines
238 B
JavaScript
13 lines
238 B
JavaScript
var imported = false;
|
|
onmessage = function(e) {
|
|
if (imported) {
|
|
postMessage(sha3_512(e.data));
|
|
if (typeof exports !== 'undefined') {
|
|
imported = false;
|
|
}
|
|
} else {
|
|
imported = true;
|
|
importScripts(e.data);
|
|
}
|
|
}
|