monkeeShark/src/client/app/common/scripts/get-md5.ts

8 lines
199 B
TypeScript
Raw Normal View History

const crypto = require('crypto');
export default (data: ArrayBuffer) => {
const buf = new Buffer(data);
const hash = crypto.createHash("md5");
hash.update(buf);
return hash.digest("hex");
};