it should be easy to understand as it's close to C# Net with an example in the end! it's very easy to understand and reuse! Have you checked this example on microsoft website? This method should return password if there is any. OnPassword is a instance of PasswordHandler delegate with signature: public static string OnPassword(bool verify, object arg) Stream cin = Console.OpenStandardInput() Sample code of reading file from console application mentioned in comments: public static BIO GetInFile(string infile) To create RSA class from file: RSA rsa = RSA.FromPrivateKey(bin, OnPassword, null) īin is instance of BIO class and should contains text you want to decrypt/encrypt. Rsa.GenerateKeys(1024, 65537, null, null) įile.WriteAllText("MasterPrivateKey.pem", rsa.PrivateKeyAsPEM) įile.WriteAllText("MasterPublicKey.pem", rsa.PublicKeyAsPEM) To generate and save keys: rsa = new () Just read the TestKey method and it should be easy to use the library without any problems in case of any please let me know. There is one test for RSA encryption/decryption you can found it here. You can take a look at test suite for this wrapper.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |