rsa-javascript-php
rsa-javascript-php copied to clipboard
phpseclib not working
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.