rsa-javascript-php icon indicating copy to clipboard operation
rsa-javascript-php copied to clipboard

phpseclib not working

Open mvhaen opened this issue 12 years ago • 0 comments

I tried out this project but was unable to get jsbn working with phpseclib. I ended up writing my own little project that got everything working.

The issue is that phpseclib generates a multi-line string in OpenSSL style notation as public key. This causes two problems

  • javascript does support multi-line string literals.
  • jsbn actually expects the public key to be represented in hex, so you need to take some extra steps in phpseclib to get that output.

You could use the code at https://github.com/mvhaen/phpseclib-jsbn-rsa as a start to fix your component.

mvhaen avatar Feb 15 '13 12:02 mvhaen