mirrored from https://www.bouncycastle.org/repositories/pc-dart
-
Notifications
You must be signed in to change notification settings - Fork 117
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 use public key which is in string format? #101
Comments
Yes, it's possible. You need the dart:convert library: // at the top of your file
import 'dart:convert';
// in your method or whatever
String encryptFromKey(String encodedPublicKey) {
var bytes = base64Url.decode(encodedPublicKey);
// then do the encryption with your bytes... you should be able to figure out the rest.
} |
My bytes should be converted to RSAPublicKey object in some way? I see it is used in every example |
So I don't understand how to convert this lines into Dart:
|
@oleg-ilechko I am facing the same issue here. Did you get any solution? Appreciate it if you share the code here. I had tried the pointycastle code, but it won't work properly
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have this Java code which encrypts data with public key:
Is it possible to implement such thing with PointyCastle? My main issue is how should I use my public key which I receive as string to perform encryption with PointyCastle API
The text was updated successfully, but these errors were encountered: