We have been asked to encrypt text with following encryption method RSA/ECB/OAEPWithMD5AndMGF1Padding.
While defining the OAEP padding we are only allowed to define one hash function(MD5) and I could not find any way to define the other hash function(MGF1).
var rsa = new RSACng();
rsa.ImportParameters(parameters);
byte[] bytesToBeEncoded = Encoding.UTF8.GetBytes("Testing message");
var encryptedText = rsa.Encrypt(bytesToBeEncoded, RSAEncryptionPadding.CreateOaep(HashAlgorithmName.MD5));
Is there any way we can define the other hash function for Oaep padding (MGF1) or is it not possible within C#?
Thanks