UNPKG

jwk-encrypt

Version:

Encrypt and decrypt your data using JSON Web Key (JWK). Implemented using [Web Crypto Api](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API), [RSA-OAEP](https://datatracker.ietf.org/doc/html/rfc3447), [AES-CTR](https://csrc.nist.gov/publica

15 lines 661 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.appendBuffers = exports.fromBase64 = exports.toBase64 = void 0; const toBase64 = (array) => Buffer.from(array).toString('base64'); exports.toBase64 = toBase64; const fromBase64 = (string) => Buffer.from(string, 'base64').buffer; exports.fromBase64 = fromBase64; const appendBuffers = (buffer1, buffer2) => { var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); tmp.set(new Uint8Array(buffer1), 0); tmp.set(new Uint8Array(buffer2), buffer1.byteLength); return tmp.buffer; }; exports.appendBuffers = appendBuffers; //# sourceMappingURL=utils.js.map