Skip to main content

Client-side Encryption Helpers

Overview​

Use these helper packages when you need to encrypt values like session_token or transaction_id on the client side before sending them to PayWise services.

All packages are compatible with the PayWise encryption format used by:

  • paywise-dap/src/shared/crypto/encryption.service.ts
  • payWiseEncrypt(secretKey, value)
  • payWiseDecrypt(secretKey, encryptedBase64)

Download packages​

Shared algorithm contract​

All language packages follow the same encryption contract:

  • AES-256-CBC
  • PKCS padding
  • OpenSSL-style EVP_BytesToKey derivation with MD5 and an 8-byte salt
  • Envelope payload fields: ct, iv, s
  • Final output format: base64(utf8(json-envelope))

Because the contract is shared, payloads can be encrypted in one language and decrypted in another.

Language guides​