https://github.com/serviejs/keycrypt
Data encryption and decryption for rotating credentials and algorithms
https://github.com/serviejs/keycrypt
cryptography encryption rotating-credentials
Last synced: 8 months ago
JSON representation
Data encryption and decryption for rotating credentials and algorithms
- Host: GitHub
- URL: https://github.com/serviejs/keycrypt
- Owner: serviejs
- License: other
- Created: 2018-06-09T13:47:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T06:58:41.000Z (over 2 years ago)
- Last Synced: 2024-04-25T21:44:33.922Z (about 2 years ago)
- Topics: cryptography, encryption, rotating-credentials
- Language: TypeScript
- Size: 58.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Keycrypt
[](https://npmjs.org/package/keycrypt)
[](https://npmjs.org/package/keycrypt)
[](https://travis-ci.org/serviejs/keycrypt)
[](https://coveralls.io/r/serviejs/keycrypt?branch=master)
> Data encryption and decryption for rotating credentials and algorithms.
_(Inspired by [keygrip](https://github.com/crypto-utils/keygrip) and [this PR](https://github.com/crypto-utils/keygrip/pull/29))._
## Installation
```
npm install keycrypt --save
```
## Usage
```ts
import { Keycrypt } from 'keycrypt'
const secrets = [Buffer.from('secret', 'utf8')]
const keycrypt = new Keycrypt(secrets)
const raw = Buffer.from('some data', 'utf8')
const encrypted = keycrypt.encode(raw)
const decrypted = keycrypt.decode(encrypted)
assert.equal(decrypted, raw)
```
## TypeScript
This project is using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions to NPM.
## License
Apache 2.0