[CryptoAPI] GetPrivateKey issue

[CryptoAPI] GetPrivateKey issue

  
Forge Component
(12)
Published on 17 Oct (yesterday) by Ricardo Silva
12 votes
Published on 17 Oct (yesterday) by Ricardo Silva

Dear all,


have i small issue with the getPrivateKey().

Our application has 3 modules: 1 Web-App, one mobile-app and one "integration layer".

Question 1; Is the result of the getPrivateKey() on all three modules the same?

My guess it is not, because i'm getting a lot of "decryption failed"

We are using the k-encrypt method (in the web-app) to securely store a client-pass we need further-on in the "integration layer".


Regards,

Jeroen


Solution

Yes, if the modules are all in the same environment getPrivateKey() should return the same on all of them.

You can double-check this by taking the returned binary data, base64 encoding it (using the BinaryData extension), and checking the result in those modules.

Let me know what you find. Obviously, don't actually share any of the private keys here.

Solution

Hi Ricardo,


thanks for your reply!

I've tested my application again after publishing all 3 modules a few times.

Now indeed the problem is solved :-)