Closed wyklif closed 4 years ago
I'm sorry for the late response, as I've been busy lately. As of right now, there is no way to do this. However, I am working on a way to get this done; as soon as I'm finished, I'll get back to you with details.
I finished the update. By updating the package to 1.3.0+, you'll get access to the new
Future<T> parseKeyFromFile<T extends RSAAsymmetricKey>(String fileName)
method in RsaCrypt
, which returns the relevant RSA key given a file path to a PEM file.
It would look something like this in practice:
var crypt = RsaCrypt();
RSAPrivateKey privKey = await crypt.parseKeyFromFile<RSAPrivateKey>("filepathhere");
return crypt.encrypt("mytexthere", privKey);
Lemme know if anything goes wrong; nothing showed up in my tests, but it's very possible I missed a case. I'm closing this for now.
@wyklif I closed this. If you have any problems whatsoever, please let me know.
Thank you sir,
Sent from Yahoo Mail on Android
On Wed, Sep 25, 2019 at 4:18, AKushWarriornotifications@github.com wrote:
I finished the update. By updating the package to 1.3.0+, you'll get access to the new
Future
Lemme know if anything goes wrong; nothing showed up in my tests, but it's very possible I missed a case. I'm closing this for now.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
How would you load a .pem file to use for asymmetric encryption from the assets directory?