private string GetExchangeEncryptionAlgorithmName( AlgorithmIdentifier algo) { DerObjectIdentifier oid = algo.Algorithm; if (Asn1Pkcs.PkcsObjectIdentifiers.RsaEncryption.Equals(oid)) { return("RSA//PKCS1Padding"); } else if (Asn1Pkcs.PkcsObjectIdentifiers.IdRsaesOaep.Equals(oid)) { Asn1Pkcs.RsaesOaepParameters rsaParams = Asn1Pkcs.RsaesOaepParameters.GetInstance(algo.Parameters); return("RSA//OAEPWITH" + DigestUtilities.GetAlgorithmName(rsaParams.HashAlgorithm.Algorithm) + "ANDMGF1Padding"); } return(oid.Id); }