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

PaddingModeNotSupported() private static method

private static PaddingModeNotSupported ( ) : Exception
return Exception
        private static Exception PaddingModeNotSupported()
        {
            return new CryptographicException(SR.Cryptography_InvalidPaddingMode);
        }

Usage Example

 public override byte[] SignHash(byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
 {
     if (hash == null)
     {
         throw new ArgumentNullException("hash");
     }
     if (string.IsNullOrEmpty(hashAlgorithm.Name))
     {
         throw RSA.HashAlgorithmNameNullOrEmpty();
     }
     if (padding == (RSASignaturePadding)null)
     {
         throw new ArgumentNullException("padding");
     }
     if (padding != RSASignaturePadding.Pkcs1)
     {
         throw RSACryptoServiceProvider.PaddingModeNotSupported();
     }
     return(this.SignHash(hash, RSACryptoServiceProvider.GetAlgorithmId(hashAlgorithm)));
 }
All Usage Examples Of System.Security.Cryptography.RSACryptoServiceProvider::PaddingModeNotSupported