{"_id":"@ably/react-native-aes","_rev":"4-4ab8467af39e119798b70fee404e4a87","name":"@ably/react-native-aes","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@ably/react-native-aes","version":"0.0.1","keywords":["react-native","react-component","ios","android","aes","crypto","mobile","async","sha1","sha256","sha512","pbkdf2","hmac256","hmac512","uuid"],"author":{"name":"ably"},"license":"MIT","_id":"@ably/react-native-aes@0.0.1","maintainers":[{"name":"mschristensen","email":"mike@christensen.codes"},{"name":"ably-realtime","email":"account.owners@ably.com"},{"name":"simonw_ably","email":"simon.woolf@ably.com"},{"name":"owenpearson","email":"owen.pearson@ably.com"},{"name":"hingasellu","email":"hingasellu@gmail.com"},{"name":"ttypic","email":"khokhlov.e.n@gmail.com"},{"name":"andrii.bulat.ably","email":"andrii.bulat@ably.com"},{"name":"andytwf","email":"andyford993@gmail.com"},{"name":"splind06","email":"steven.lindsay@ably.com"},{"name":"zariel-ably","email":"chris.bannister@ably.com"},{"name":"mattheworiordan","email":"matthew.oriordan@gmail.com"},{"name":"vlad.velici.ably","email":"vlad.velici@ably.com"}],"homepage":"https://github.com/ably-forks/react-native-aes","bugs":{"url":"https://github.com/ably-forks/react-native-aes/issues"},"dist":{"shasum":"32bb1befdc2011f618f0e551c8e9b6be1f9fa6e6","tarball":"https://registry.npmjs.org/@ably/react-native-aes/-/react-native-aes-0.0.1.tgz","fileCount":15,"integrity":"sha512-x418yGkJ6Jr8HxIt8RZ2KLSlnvAWuuufSizXy2lTWJhoIBil+q2tNy5D5N+LX59hywltNnYuyfUra6eAKr0iyA==","signatures":[{"sig":"MEUCIQCV1nIDGOzkIJj/qQwrHIqtOv5aKUC89oilkm6dqv7JzgIgBAuyQwiiHxtQwMKRAoy5rFBj5/DRRG6dQQT0xFfPsxQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44704},"main":"index.js","types":"index.d.ts","gitHead":"d86019e3b2c9d310f545d14a0a46484eed389e82","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ttypic","email":"khokhlov.e.n@gmail.com"},"repository":{"url":"git://github.com/ably-forks/react-native-aes.git","type":"git"},"_npmVersion":"10.2.3","description":"AES crypto native module for react-native","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/react-native-aes_0.0.1_1763381019678_0.4986609963392772","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@ably/react-native-aes","version":"0.0.3","keywords":["react-native","ios","android","aes","crypto","mobile"],"author":{"name":"ably"},"license":"MIT","_id":"@ably/react-native-aes@0.0.3","maintainers":[{"name":"mschristensen","email":"mike@christensen.codes"},{"name":"ably-realtime","email":"account.owners@ably.com"},{"name":"simonw_ably","email":"simon.woolf@ably.com"},{"name":"owenpearson","email":"owen.pearson@ably.com"},{"name":"hingasellu","email":"hingasellu@gmail.com"},{"name":"ttypic","email":"khokhlov.e.n@gmail.com"},{"name":"andrii.bulat.ably","email":"andrii.bulat@ably.com"},{"name":"andytwf","email":"andyford993@gmail.com"},{"name":"splind06","email":"steven.lindsay@ably.com"},{"name":"zariel-ably","email":"chris.bannister@ably.com"},{"name":"mattheworiordan","email":"matthew.oriordan@gmail.com"},{"name":"vlad.velici.ably","email":"vlad.velici@ably.com"}],"homepage":"https://github.com/ably-forks/react-native-aes","bugs":{"url":"https://github.com/ably-forks/react-native-aes/issues"},"dist":{"shasum":"01c4821f259b361faf909de1fe7233bc2ba20d28","tarball":"https://registry.npmjs.org/@ably/react-native-aes/-/react-native-aes-0.0.3.tgz","fileCount":27,"integrity":"sha512-27WX0bt9clNKGe5nKKsaytIQz4I1/+HrzBm/QGxz909BzXk4zoKWo1oKJ3Y9RqKCzfcI+qpJcfoAR0BvlhHytg==","signatures":[{"sig":"MEYCIQCJlN+Hy2vUYiftNyKU9oZe+qiX8hNuD0cCl1N+GYF7fQIhAJ1tiCCHUNWct/DC0s/FLWV/s9f9xHY7v/uEILPw6dTg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":155646},"main":"index.js","types":"index.d.ts","gitHead":"0c2cac04e5f14b8aa0085f7c02f6cd0afc9580b3","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ttypic","email":"khokhlov.e.n@gmail.com"},"repository":{"url":"git://github.com/ably-forks/react-native-aes.git","type":"git"},"_npmVersion":"10.2.3","description":"AES crypto native module for react-native","directories":{},"_nodeVersion":"20.10.0","codegenConfig":{"name":"NativeAesSpec","type":"modules","android":{"javaPackageName":"com.ably.rn"},"jsSrcsDir":"spec"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/react-native-aes_0.0.3_1764287115465_0.4041733170281636","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-11-17T12:03:39.613Z","modified":"2026-03-18T18:56:53.681Z","0.0.1":"2025-11-17T12:03:39.862Z","0.0.3":"2025-11-27T23:45:15.663Z"},"bugs":{"url":"https://github.com/ably-forks/react-native-aes/issues"},"author":{"name":"ably"},"license":"MIT","homepage":"https://github.com/ably-forks/react-native-aes","keywords":["react-native","ios","android","aes","crypto","mobile"],"repository":{"url":"git://github.com/ably-forks/react-native-aes.git","type":"git"},"description":"AES crypto native module for react-native","maintainers":[{"email":"mike@christensen.codes","name":"mschristensen"},{"email":"account.owners@ably.com","name":"ably-realtime"},{"email":"simon.woolf@ably.com","name":"simonw_ably"},{"email":"owen.pearson@ably.com","name":"owenpearson"},{"email":"khokhlov.e.n@gmail.com","name":"ttypic"},{"email":"lawrence.forooghian@ably.com","name":"lawrence.forooghian.ably"},{"email":"andrii.bulat@ably.com","name":"andrii.bulat.ably"},{"email":"andyford993@gmail.com","name":"andytwf"},{"email":"steven.lindsay@ably.com","name":"splind06"},{"email":"chris.bannister@ably.com","name":"zariel-ably"},{"email":"matthew.oriordan@gmail.com","name":"mattheworiordan"},{"email":"vlad.velici@ably.com","name":"vlad.velici.ably"}],"readme":"# React Native AES\n\nAES encryption/decryption for react-native\n\n## Installation\n\n```sh\nnpm install --save @ably/react-native-aes\n```\n\nor\n\n```sh\nyarn add @ably/react-native-aes\n```\n\n### Installation (iOS)\n\n##### Using CocoaPods (React Native 0.60 and higher)\n\n```sh\ncd ios\npod install\n```\n\n## Usage\n\nThis library uses React Native TurboModules for optimal performance.\n\n### Example\n\n```js\nimport { encrypt, decrypt } from '@ably/react-native-aes';\n\nasync function encryptData() {\n    try {\n        // Algorithm name (e.g., 'aes-128-cbc', 'aes-256-cbc', 'aes-128-ctr', 'aes-256-ctr')\n        const algorithm = 'aes-256-cbc';\n\n        // Convert your key, iv, and data to ArrayBuffers\n        const key = new Uint8Array(32); // 32 bytes for AES-256\n        const iv = new Uint8Array(16);  // 16 bytes for AES IV\n        const data = new TextEncoder().encode('Hello World');\n\n        const encryptedData = await encrypt(\n            algorithm,\n            iv.buffer,\n            key.buffer,\n            data.buffer\n        );\n\n        console.log('Encrypted:', new Uint8Array(encryptedData));\n\n        // Decrypt the data\n        const decryptedData = await decrypt(\n            algorithm,\n            iv.buffer,\n            key.buffer,\n            encryptedData\n        );\n\n        const text = new TextDecoder().decode(decryptedData);\n        console.log('Decrypted:', text);\n\n        return text;\n    } catch (e) {\n        console.error('Encryption error:', e);\n    }\n}\n```\n\n### Methods\n\n-   `encrypt(name: String, iv: ArrayBuffer, key: ArrayBuffer, data: ArrayBuffer) => Promise<ArrayBuffer>`\n-   `decrypt(name: String, iv: ArrayBuffer, key: ArrayBuffer, data: ArrayBuffer) => Promise<ArrayBuffer>`\n\n### Supported Algorithms\n\n-   `aes-128-cbc` - AES-128 in CBC mode\n-   `aes-192-cbc` - AES-192 in CBC mode\n-   `aes-256-cbc` - AES-256 in CBC mode\n-   `aes-128-ctr` - AES-128 in CTR mode\n-   `aes-192-ctr` - AES-192 in CTR mode\n-   `aes-256-ctr` - AES-256 in CTR mode\n","readmeFilename":"README.md"}