System.Security.Cryptography.RSACryptoServiceProvider.RSACryptoServiceProvider.Decrypt C# (CSharp) Method

Decrypt() public method

public Decrypt ( byte rgb, bool fOAEP ) : byte[]
rgb byte
fOAEP bool
return byte[]
		public byte[] Decrypt (byte[] rgb, bool fOAEP) 
		{
#if NET_1_1
			if (m_disposed)
				throw new ObjectDisposedException ("rsa");
#endif
			// choose between OAEP or PKCS#1 v.1.5 padding
			AsymmetricKeyExchangeDeformatter def = null;
			if (fOAEP)
				def = new RSAOAEPKeyExchangeDeformatter (rsa);
			else
				def = new RSAPKCS1KeyExchangeDeformatter (rsa);

			return def.DecryptKeyExchange (rgb);
		}