MCPcopy
hub / github.com/mailvelope/mailvelope / getUUID

Function getUUID

src/client-API/client-api.js:716–728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

714}
715
716function getUUID() {
717 if (crypto.randomUUID) {
718 return crypto.randomUUID().replaceAll('-', '');
719 } else {
720 let result = '';
721 const buf = new Uint16Array(8);
722 crypto.getRandomValues(buf);
723 for (let i = 0; i < buf.length; i++) {
724 result += buf[i].toString(16);
725 }
726 return result;
727 }
728}
729
730function mapError(obj) {
731 const error = new Error(obj.message);

Callers 1

sendFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected