Skip to content

let publicKey / privateKey be Buffers too, not just filenames #7

@mariusa

Description

@mariusa

We need to store keys in a database, not as files on disk.

The sample provided by netopia allows passing keys both as Buffers and filenames:
https://github.com/mobilpay/Node.js/blob/b92ad2fac6b3b522959db2f08cf57371fc87c86f/encrypt.js#L17
https://nodejs.org/api/crypto.html#crypto_crypto_publicencrypt_key_buffer

Would you please allow the same in MobilPay() library? eg

const mobilPay = new MobilPay({
  signature: '',
  sandbox: true,
  publicKey: 'filename or buffer',
  privateKey: 'filename or buffer',
});

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions