source: trip-planner-front/node_modules/uuid/dist/esm-node/md5.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

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