Md5
Extends:
src/hasher/hasher32le.js~Hasher32le → Md5
Calculates MD5 hash
Example:
import Md5 from "crypto-api/src/hasher/md5";
import {toHex} from "crypto-api/src/encoder/hex";
let hasher = new Md5();
hasher.update('message');
console.log(toHex(hasher.finalize()));
import Md5 from "crypto-api/src/hasher/md5";
import {toHex} from "crypto-api/src/encoder/hex";
import {fromUtf} from "crypto-api/src/encoder/utf";
let hasher = new Md5();
hasher.update(fromUtf('message'));
console.log(toHex(hasher.finalize()));
<script src="https://nf404.github.io/crypto-api/crypto-api.min.js"></script>
<script>
var hasher = CryptoApi.getHasher('md5');
hasher.update('message');
console.log(CryptoApi.encoder.toHex(hasher.finalize()));
</script>
<script src="https://nf404.github.io/crypto-api/crypto-api.min.js"></script>
<script>
console.log(CryptoApi.hash('md5', 'message'));
</script>