codigo0/backend/node_modules/uuid/dist-node/md5.js
planetazuzu 0201f16cf4
Some checks are pending
Auto Deploy to Server / deploy (push) Waiting to run
Update lab configuration 2026-03-22
2026-03-22 22:50:29 +01:00

12 lines
305 B
JavaScript
Executable file

import { createHash } from 'node:crypto';
function md5(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
}
else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return createHash('md5').update(bytes).digest();
}
export default md5;