Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpseclib not working #1

Open
mvhaen opened this issue Feb 15, 2013 · 0 comments
Open

phpseclib not working #1

mvhaen opened this issue Feb 15, 2013 · 0 comments

Comments

@mvhaen
Copy link

mvhaen commented Feb 15, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant