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:
393 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | const crypto_1 = require("crypto");
|
---|
| 4 | function md5(bytes) {
|
---|
| 5 | if (Array.isArray(bytes)) {
|
---|
| 6 | bytes = Buffer.from(bytes);
|
---|
| 7 | }
|
---|
| 8 | else if (typeof bytes === 'string') {
|
---|
| 9 | bytes = Buffer.from(bytes, 'utf8');
|
---|
| 10 | }
|
---|
| 11 | return (0, crypto_1.createHash)('md5').update(bytes).digest();
|
---|
| 12 | }
|
---|
| 13 | exports.default = md5;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.