Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mariusa opened this issue Jul 6, 2020 · 1 comment
Open

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

mariusa opened this issue Jul 6, 2020 · 1 comment

Comments

@mariusa
Copy link

mariusa commented Jul 6, 2020

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!

@robi-richter
Copy link
Owner

@mariusa sure, but currently I don't have the bandwidth to implement the change. I would be happy to review a PR with the changes and merge them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants