https://github.com/internxt/rn-crypto
https://github.com/internxt/rn-crypto
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/internxt/rn-crypto
- Owner: internxt
- License: bsd-3-clause
- Created: 2022-06-02T12:23:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-28T09:13:57.000Z (about 1 year ago)
- Last Synced: 2025-01-28T10:24:56.011Z (about 1 year ago)
- Language: Swift
- Size: 662 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# rn-crypto
A library for using crypto in native modules
## Installation
```sh
npm install rn-crypto
```
## Usage
```js
import { encryptFile } from "rn-crypto";
// ...
const sourcePath = '/path/where/content/to/encrypt/is';
const destinationPath = '/path/where/writing/encrypted/output';
const key = 'hexadecimal-encryption-file-key';
const iv = 'hexadecimal-initialization-vector';
encryptFile(
sourcePath,
destinationPath,
key,
iv,
(err) => {
if (err) {
// handle error...
} else {
// file is encrypted succesfully, it can be found at destinationPath
}
}
)
```
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT