TurtlePay® Utilities Library
Master Build Status
Development Build Status
Overview
Provides an easy to use HTTP/s Client interface that is meant to be extended from
Prerequisites
- node >= 12
Documentation
Full library documentation is available at https://utilities.turtlepay.dev
Install
Using Yarn
yarn add @turtlepay/utilities
Using NPM
npm install @turtlepay/utilities
Usage
import { AES, PEM } from '@turtlepay/utilities';
(async() => {
const pem = new PEM()
const keys = await pem.generateKeys();
const sig = await pem.sign({test: 'data'}, keys.privateKey);
console.log(await pem.verify({test: 'data'}, keys.publicKey, sig));
})
(async() => {
const aes = new AES('password');
const secret = await aes.encrypt({test: 'data'});
const data = await aes.decrypt<{test: string}>(secret);
console.log(data);
})
Run tests
yarn test
Author
- Twitter: @TurtlePay
- Github: @TurtlePay
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Show your support
Give a
📝 License
Copyright © 2020 TurtlePay® Development Team.
This project is MIT licensed.