dynamic key encryption - need javascript or PHP example

0

So I've scoured the net (best I can) for any examples of javascript or PHP that encrypt a password with an RSA public key using the Bouncy Castle provider (RSA/NONE/NoPadding algorithm).  The samples from the install don't work (at least I couldn't get them to - encrypt.js, encrypt.html, etc).

The code has to work with JRS 5.5.0 CE server encryption.  I have turned on dynamic key encryption, so will be getting public key before every http call and encrypting the password before sending to server.  Ironically, I can send plain text passwords just fine, so I guess dynamic key encryption has a fallback and works with plain text too.

In addition to any code examples, does the client have to base64 encode the encrypted password before sending it?  The SOAP docs mention encoding the userid and password, but not the REST docs.

This topic seems to be a guarded secret to those learning how it works.  Lots of online postings, but very little working assistance.

My client app is PHP, so that is easier to integrate, but can use javascript also.  Will be very grateful for either one.

Thanks in advance.

Chris

barkoco's picture
Joined: Oct 30 2014 - 10:06pm
Last seen: 4 years 9 months ago

Did you get any solution? I am stuck at the same place. 

nazaf - 3 years 10 months ago

0 Answers:

No answers yet
Feedback
randomness