0.0.3 • Published 3 years ago
piano-security-utils v0.0.3
Piano Security Utils
This is unofficial Node.js porting of TPSecurityUtils.php
included in Piano PHP SDK.
Installation
npm install piano-security-utils
or
yarn add piano-security-utils
Usage examples
Decrypt an encrypted webhook data
import { decrypt } from 'piano-security-utils';
const webhookData = '<encrypted webholk data>';
const privateKey = '<your piano private key>';
const result = decrypt(privateKey, webhookData);
Status
The following TPSecurityUtils
methods are currently supported:
- hashCode
- encrypt
- urlensafe
- urldesafe
- decrypt
- hashHmacSha1
- hashHmacSha256
- hashHmacSha
- createUserRef