Enkash Developer Portal
Home
Home
Login
  1. Home
  • Back to home
  • Wallet APIs
  • Authentication
    • Auth Token
  • Wallet Setup
    • Create Wallet
    • Update Wallet Details
    • VKYC Link Generation
    • VKYC Status
    • Get Wallet Details
  • Wallet Management
    • Load Money
    • Generate Transaction OTP
    • Get Transaction Details
    • Get Wallet Balance
  • Fund Transfers
    • Add Beneficiary
    • Search Beneficiaries
    • Fund Transfer
    • Wallet To Wallet Transfer
    • Get Fund Transfer Status
  • Merchant Payments
    • Initate Merchant Payment
    • Merchant Settlement
    • Settlement Status
  • Webhooks
    • Payment Notify Request
  1. Home

Authentication

PI Encryption Guidelines#

All API requests must be encrypted using AES (ECB mode, PKCS5Padding) before transmission.
This page provides the required imports, encryption/decryption utilities, and essential developer tips to ensure proper integration.

Encrypting Request Payloads#

Use the encrypt method to convert plaintext request data into an AES-encrypted Base64 string.

Encrypt Function#

Generate SecretKeySpec#

The following utility converts the provided secret key into a 128-bit AES key using SHA-256 hashing.

Decrypt Function#

Use the following method to decrypt API responses that return AES-encrypted data.

Encryption Secret Key#

Use the following secret key for all encryption and decryption:

Developer Tips#

Remove double quotes from plaintext before encrypting
Avoid trailing whitespaces in the encrypted string
Ensure encrypted payloads are passed in the correct request field (e.g., payload, requestData)
Modified at 2025-11-18 18:30:15
Next
Auth Token
Built with