https://github.com/nozzlegear/iron-async
An async wrapper for the Iron encryption package.
https://github.com/nozzlegear/iron-async
Last synced: 7 months ago
JSON representation
An async wrapper for the Iron encryption package.
- Host: GitHub
- URL: https://github.com/nozzlegear/iron-async
- Owner: nozzlegear
- License: mit
- Created: 2017-02-20T15:09:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T16:52:28.000Z (over 8 years ago)
- Last Synced: 2025-02-18T07:08:22.537Z (8 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iron-async
An async wrapper for the Iron encryption package.## Installation
With [Yarn](https://github.com/yarnpkg/yarn):
```shell
yarn install iron-async
```Or from [NPM](https://npmjs.com/package/iron-async):
```shell
npm install iron-async --save
```## Importing
Import iron-async via ES6 default import:
```js
import * as IronAsync from "iron-async";
```Or via Node's require:
```js
const IronAsync = require("iron-async");
```## Examples
**seal(value: any, password: string, defaults?)**
```js
import { seal } from "iron-async";const sealedToken: string = await seal({
hello: "world"
}, password);
```**unseal(token: string, password: string, defaults?)**
```js
import { unseal } from "iron-async";const unsealedObject = await unseal(sealedToken, password);
```