{"_id":"@basis-theory/basis-theory-js-encryption-browser","_rev":"13-281259d506b384da497d8ab491e33d88","name":"@basis-theory/basis-theory-js-encryption-browser","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@basis-theory/basis-theory-js-encryption-browser","version":"1.0.0","author":{"name":"Basis Theory","email":"support@basistheory.com"},"license":"Apache-2.0","_id":"@basis-theory/basis-theory-js-encryption-browser@1.0.0","maintainers":[{"name":"bt-platform","email":"platform@basistheory.com"},{"name":"sabriskaybt","email":"sabrina@basistheory.com"},{"name":"dhudec","email":"drew@basistheory.com"},{"name":"adamletizia","email":"adam@basistheory.com"},{"name":"briangonzalezatbt","email":"brian.gonzalez@basistheory.com"},{"name":"lcschy","email":"lucas@basistheory.com"},{"name":"davi.basistheory","email":"davi@basistheory.com"},{"name":"matthew_basistheory","email":"matthew@basistheory.com"},{"name":"bweber36","email":"brandon@basistheory.com"},{"name":"armsteadj1","email":"armsteadj1@gmail.com"}],"homepage":"https://github.com/Basis-Theory/basis-theory-js-encryption-browser#readme","bugs":{"url":"https://github.com/Basis-Theory/basis-theory-js-encryption-browser/issues"},"dist":{"shasum":"4ef5d05ed024a8fa0a44b70896b23c3dc87873b8","tarball":"https://registry.npmjs.org/@basis-theory/basis-theory-js-encryption-browser/-/basis-theory-js-encryption-browser-1.0.0.tgz","fileCount":25,"integrity":"sha512-lQ31o6D2B/ipsZtbSBnG59Dm0G70KROU4pUoTOxEcA7WyW/aC/o8ZF16d0it18txqDArflWXacz7EtcM7Ad0Kg==","signatures":[{"sig":"MEUCIQCneHgeH2OMKuB+GRIXDtrfskSfxf1/6Omu5RutXx+DyQIgFHpna25phiYXp/YSEUP5gPyF4i1QWBZu/iNujwX996g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60222},"main":"index.js","module":"index.js","engines":{"node":">=10.12.0"},"gitHead":"c888a31773d74b3042e60769f20a2336db6a50d1","typings":"index.d.ts","_npmUser":{"name":"bt-platform","email":"platform@basistheory.com"},"prettier":"@basis-theory/eslint-config/prettier","repository":{"url":"git+https://github.com/Basis-Theory/basis-theory-js-encryption-browser.git","type":"git"},"_npmVersion":"7.23.0","description":"Browser (Subtle) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).","directories":{},"_nodeVersion":"14.17.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@basis-theory/basis-theory-js-encryption":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/basis-theory-js-encryption-browser_1.0.0_1632252708981_0.23665512083814355","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-09-21T19:31:48.910Z","modified":"2024-09-16T16:49:28.071Z","1.0.0":"2021-09-21T19:31:49.121Z"},"bugs":{"url":"https://github.com/Basis-Theory/basis-theory-js-encryption-browser/issues"},"author":{"name":"Basis Theory","email":"support@basistheory.com"},"license":"Apache-2.0","homepage":"https://github.com/Basis-Theory/basis-theory-js-encryption-browser#readme","repository":{"url":"git+https://github.com/Basis-Theory/basis-theory-js-encryption-browser.git","type":"git"},"description":"Browser (Subtle) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).","maintainers":[{"email":"robert@basistheory.com","name":"greathouse-bt"},{"email":"kevin@basistheory.com","name":"kevinperaza-bt"},{"email":"josue@basistheory.com","name":"jleon15"},{"email":"lucas@basistheory.com","name":"lcschy"},{"email":"brian.gonzalez@basistheory.com","name":"briangonzalezatbt"},{"email":"drew@basistheory.com","name":"dhudec"},{"email":"davi@basistheory.com","name":"davi.basistheory"},{"email":"armsteadj1@gmail.com","name":"armsteadj1"},{"email":"matthew@basistheory.com","name":"matthew_basistheory"},{"email":"platform@basistheory.com","name":"bt-platform"}],"readme":"# BasisTheory JS Browser Encryption Provider\n\nBrowser (Subtle) Encryption Provider for the [Basis Theory](https://basistheory.com/) JS [Encryption SDK](https://github.com/Basis-Theory/basis-theory-js-encryption).\n\n## Installation\n\nUsing [Node Package Manager](https://docs.npmjs.com/)\n\n```sh\nnpm install --save @basis-theory/basis-theory-js-encryption-browser\n```\n\nUsing [Yarn](https://classic.yarnpkg.com/en/docs/)\n\n```sh\nyarn add @basis-theory/basis-theory-js-encryption-browser\n```\n\n## Documentation\n\nFor further documentation and examples, please refer to our [Docs](https://docs.basistheory.com/api-reference/encryption).\n\n## Usage\n\n### Initialization and Usage with BasisTheoryEncryption\n\nBrowser Encryption depends on `window`, usage is restrained to client-side frameworks.\n\n```javascript\nimport { BasisTheoryEncryption } from '@basis-theory/basis-theory-js-encryption';\nimport { BasisTheoryBrowserEncryptionProvider } from '@basis-theory/basis-theory-js-encryption-browser';\n\nconst browserProvider = new BasisTheoryBrowserEncryptionProvider();\nconst btEncryption = await new BasisTheoryEncryption().init([browserProvider]);\n```\n\n### Repositories\n\nLocal Key Repository and Provider Key Repository implementations are provided for testing using the browser's `localStorage`.\nIt's expected that the user provides their own repository implementations through the `init` call.\n\n```javascript\nimport { BasisTheoryEncryption } from '@basis-theory/basis-theory-js-encryption';\nimport { BasisTheoryBrowserEncryptionProvider } from '@basis-theory/basis-theory-js-encryption-browser';\n\nconst browserProvider = new BasisTheoryBrowserEncryptionProvider().init({\n  keyRepository: new MyKeyRepository(),\n  providerKeyRepository: new MyProviderKeyRepository(),\n  rsaKeySize: 2048,\n});\n\n\nconst btEncryption = await new BasisTheoryEncryption().init([browserProvider]);\n```\n\n## Development\n\nThe provided scripts with the SDK will check for all dependencies, build the solution, and run all tests.\n\n### Dependencies\n\n- [NodeJS](https://nodejs.org/en/) > 10.12.0\n- [Yarn](https://classic.yarnpkg.com/en/docs/)\n\n### Build the SDK and run Tests\n\nRun the following command from the root of the project:\n\n```sh\nmake verify\n```\n","readmeFilename":"README.md"}