I'm creating an app using yodlee api, so far everything good, but right now, I'm having this block related to the PKI feature of yodlee. I'm not able to encrypt the data using "RSA/ECB/PKCS1Padding" as they request, all I found so far are java examples, anyone with a snippet of code, or a reference to make this possible on ruby?
Asked
Active
Viewed 691 times
1 Answers
1
I guess you are referring to this manual to integrate Yodlee API with PKI feature.
Have a look into the ruby's OpenSSL classes. Encryption using RSA is possible with the OpenSSL::PKey::RSA
class, see also this intro doc. Basically you have to load the public key returned from the API, and use the public_encrypt
method to encrypt the data and hex-encode it in the end. The encryption uses the PKCS1_PADDING
by default which is just what you want.
A complete example is available in this SO answer.

Community
- 1
- 1

Matouš Borák
- 15,606
- 1
- 42
- 53
-
Thanks! Do you know if I can find any yodlee code sample? I'm already using the encryption but I'm still getting the decryption error. – Javier Suazo May 23 '16 at 08:28
-
I don't, sorry. If you have a concrete failing code, update the question or perhaps place a new one. In general, it should be an equivalent code to the Java code posted in the official manual. – Matouš Borák May 23 '16 at 08:48
-
Sorry if I mislead you, the output should be hex-encoded, not base64-encoded. I corrected the answer. – Matouš Borák May 23 '16 at 18:18