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

How to decrypt the encrypted string by private key with public key? #344

Closed
shiyunsheng opened this issue Apr 27, 2018 · 2 comments
Closed

Comments

@shiyunsheng
Copy link

No description provided.

@shiyunsheng
Copy link
Author

怎么在网页端使用公钥解密服务器用RSA 私钥加密的数据?

@kjur
Copy link
Owner

kjur commented Apr 28, 2018

You can use RSAKey.doPublic method to encode a message which is encoded by private key by public key. Please find rsasign.js code for your reference. Thanks.
https://github.com/kjur/jsrsasign/blob/master/src/rsasign-1.2.js#L234

@kjur kjur closed this as completed Apr 28, 2018
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

2 participants