Provides webcrypto in node.js context (incl. typeScript, Vue.js and both).
npm i webcrypto
Example in JavaScript
import webcrypto from 'node-webcrypto';
const keyData = webcrypto.getRandomValues(new Uint8Array(16));
const key = webcrypto.subtle.importKey("raw", keyData, "aes-gcm", false, ["encrypt", "decrypt"]).then(e => {
console.log({ e }); //prints the imported key object
});
This project is licensed under the MIT License