0.0.3 • Published 5 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-utilsor
yarn add piano-security-utilsUsage 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