Super fast and super small wasm version of md5
algorithm, able to use in browser
and nodejs
. The implementation comes from hash-wasm, We simplify the asynchronous syntax to synchronous syntax.
<!DOCTYPE html>
<html lang="en">
<body>
<script src="https://unpkg.com/super-fast-md5/dist/md5.umd.js"></script>
<script>
const hash = FastMD5.md5('code');
console.log(hash);
</script>
</body>
</html>
import { md5 } from 'super-fast-md5';
// code -> `string | ArrayBuffer`
const hash = md5('code');
console.log(hash);
./a.js (1024 KiB)
> 10ms