1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-25 20:18:18 +09:00
MisskeyIO/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");
};