An open API service indexing awesome lists of open source software.

https://github.com/sjc5/crypto

Assorted high-level cryptography utils in TypeScript
https://github.com/sjc5/crypto

crypto decryption encryption high-level typescript

Last synced: about 1 year ago
JSON representation

Assorted high-level cryptography utils in TypeScript

Awesome Lists containing this project

README

          

# @sjc5/crypto

Simple, high-level crypto utils in TypeScript.

Has two dependencies:
`tweetnacl` for the underlying crypto and `@stablelib/base64` for base64 encoding utils.

## Installation:

```sh
npm i @sjc5/crypto
```

## Usage:

```ts
import { random_key, encrypt, decrypt } from "@sjc5/crypto"

const message = "hello world"
const key = random_key()

const encrypted_message = encrypt({ message, key })
const decrypted = decrypt({ encrypted_message, key })
```