source: imaps-frontend/node_modules/uuid/dist/esm/md5.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 300 bytes
Line 
1import { createHash } from 'crypto';
2function md5(bytes) {
3 if (Array.isArray(bytes)) {
4 bytes = Buffer.from(bytes);
5 }
6 else if (typeof bytes === 'string') {
7 bytes = Buffer.from(bytes, 'utf8');
8 }
9 return createHash('md5').update(bytes).digest();
10}
11export default md5;
Note: See TracBrowser for help on using the repository browser.