https://github.com/attla/cripta
🧛 A layer of encryption a little too judicious
https://github.com/attla/cripta
aws aws-lambda decription encription encryption hash llrt pincryp serverless
Last synced: 12 months ago
JSON representation
🧛 A layer of encryption a little too judicious
- Host: GitHub
- URL: https://github.com/attla/cripta
- Owner: attla
- License: mit
- Created: 2025-05-18T04:50:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-27T18:44:03.000Z (about 1 year ago)
- Last Synced: 2025-05-30T00:05:37.570Z (about 1 year ago)
- Topics: aws, aws-lambda, decription, encription, encryption, hash, llrt, pincryp, serverless
- Language: TypeScript
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Criptλ

- [Installation](#install)
- [Usage](#usage)
- [License](#license)
## Install
```bash
# bun
bun i cripta
# pnpm
pnpm i cripta
# npm
npm i cripta
# yarn
yarn i cripta
```
## Usage
```ts
import { cripta } from 'cripta'
const instance = cripta({ key: 'your-secret-key' })
const encoded = instance.encode('hic sunt dracones')
console.log('Encoded: ', encoded)
console.log('Decoded: ', instance.decode(encoded))
```
The Cripta can encrypt all primitive types: `array`, `object`, `string`, `number`, `bigint`, `boolean`, `Symbol`, `undefined` and `null`.
See an example of object encryption:
```ts
// encoding
const encoded = instance.encode({
name: 'John Doe',
email: 'john@example.com'
})
console.log('Encoded object: ', encoded)
// retrieve the object from encoded value
const decoded = instance.decode(encoded)
console.log('Decoded object: ', decoded)
```
## License
This package is licensed under the [MIT license](https://github.com/attla/cripta/blob/main/LICENSE) © [Zunq](https://zunq.com)