0.1.2 • Published 6 years ago
crypto-io-utils v0.1.2
crypto-io-utils
Utility's used in crypto-modules.
import { encrypt, decrypt, read, write, ... } from 'crypto-io-utils';
(async () => {
const result = await encrypt('hello', 'pubkey');
await write('hello.txt', result);
const cipher = await read('hello.txt');
const data = await decrypt(cipher, 'secret');
})();
API
backed{options}
options
encrypt
Type: Promise
Params: data, secret
encrypt(data, secret).then(cipher => ...);
decrypt
Type: Promise
Params: cipher, secret
decrypt(cipher, secret).then(data => ...);
read
Type: Promise
Params: path, as
Options:
as string, json & map
write(path, data).then(() => ...);
write
Type: Promise
Params: path, data
write(path, data).then(() => ...);
remove
Type: string
Default: ''
remove('rainbows').then(() => ...);
mkdir
Type: string
Default: ''
mkdir('rainbows').then(() => ...);
direxists
Type: string
Default: ''
direxists('rainbows').then(exists => ...);
exists
Type: string
Default: ''
exists('rainbows.txt').then(exists => ...);
0.1.2
6 years ago
0.1.2-alpha.1
6 years ago
0.1.2-alpha
6 years ago
0.1.1
6 years ago
0.1.0-rc.3
6 years ago
0.1.0-rc.2
6 years ago
0.1.0-rc.1
6 years ago
0.1.0-beta.1
6 years ago
0.1.0-beta
6 years ago
0.1.0-alpha.6
6 years ago
0.1.0-alpha.5
6 years ago
0.1.0-alpha.4
6 years ago
0.1.0-alpha.3
6 years ago
0.1.0-alpha.2
6 years ago