Efficient management of multi-currency payments

Encrypted Settings

In instances where IO requires the submission of sensitive secrets through our platform, such as configuring your flow payment rails; it is crucial to maintain the confidentiality and integrity of such data. We employ a robust encryption protocol to ensure that your secrets are securely encrypted before transit and remain that way within our systems.

Secure Storage

The encrypted secrets remain encrypted at all times except during our platform's runtime environment, which means the secrets are never exposed in their raw form.

Local Encryption

To facilitate secure transmission of your secrets, please use the following script to encrypt your data locally. It is vital to eliminate any local traces of the secret once the encryption process is complete.

const crypto = require('crypto');
const fs = require('fs');

// Function to encrypt payload using RSA public key
const encryptRSAPayload = (buffer, publicKey) => {
  const encryptedBuffer = crypto.publicEncrypt(
    {
      key: publicKey,
      oaepHash: 'sha256',
      padding: crypto.constants.RSA_PKCS1_OAEP_PADDING,
    },
    buffer,
  );

  // Convert encrypted data to Base64
  const payloadAsBase64 = Buffer.from(encryptedBuffer).toString('base64');

  return payloadAsBase64;
};

// Read the public key from a .pem file
const publicKey = fs.readFileSync('./iofinnet-settings.pem', 'utf-8');

// Your payload should be provided by our technical integration team
const payloadToEncrypt = {}; // This should be the actual payload

// Convert the payload to a string format
const payloadStringified = JSON.stringify(payloadToEncrypt);

// Encrypt the payload
const encryptedPayload = encryptRSAPayload(
  Buffer.from(payloadStringified, 'utf8'),
  publicKey,
);

// Output the encrypted payload
console.log(encryptedPayload);