in src/Util/RsaUtils.cs [17:32]
internal static IBufferedCipher CreateRsaOaepSha1Cipher(bool forEncryption, RSA rsa)
{
var cipher = CipherUtilities.GetCipher("RSA/NONE/OAEPPadding");
if (forEncryption)
{
var rsaPublicKey = DotNetUtilities.GetRsaPublicKey(rsa);
cipher.Init(true, rsaPublicKey);
}
else
{
var asymmetricCipherKeyPair = DotNetUtilities.GetRsaKeyPair(rsa);
cipher.Init(false, asymmetricCipherKeyPair.Private);
}
return cipher;
}