public static TwoWayRsaPair FromString(string input) { var retv = new TwoWayRsaPair(); retv.SetFromString(input); return(retv); }
public static (TwoWayRsaPair, TwoWayRsaPair) Generate() { var RSA1 = new RSACryptoServiceProvider(); var RSA2 = new RSACryptoServiceProvider(); var Keypair1 = new TwoWayRsaPair { EncryptionKey = RSA1.ExportCspBlob(false), DecryptionKey = RSA2.ExportCspBlob(true), }; var Keypair2 = new TwoWayRsaPair { EncryptionKey = RSA2.ExportCspBlob(false), DecryptionKey = RSA1.ExportCspBlob(true), }; return(Keypair1, Keypair2); }
public TwoWayRsaEncryptor(TwoWayRsaPair keypair) { KeyPair = keypair; }