System.Security.Cryptography.RSA.HashAlgorithmNameNullOrEmpty C# (CSharp) Method

HashAlgorithmNameNullOrEmpty() private static method

private static HashAlgorithmNameNullOrEmpty ( ) : Exception
return Exception
        private static Exception HashAlgorithmNameNullOrEmpty()
        {
            return new ArgumentException(SR.Cryptography_HashAlgorithmNameNullOrEmpty, "hashAlgorithm");
        }

Usage Example

Beispiel #1
0
 public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
 {
     if (data == null)
     {
         throw new ArgumentNullException("data");
     }
     if (offset < 0 || offset > data.Length)
     {
         throw new ArgumentOutOfRangeException("offset");
     }
     if (count < 0 || count > data.Length - offset)
     {
         throw new ArgumentOutOfRangeException("count");
     }
     if (signature == null)
     {
         throw new ArgumentNullException("signature");
     }
     if (string.IsNullOrEmpty(hashAlgorithm.Name))
     {
         throw RSA.HashAlgorithmNameNullOrEmpty();
     }
     if (padding == (RSASignaturePadding)null)
     {
         throw new ArgumentNullException("padding");
     }
     return(this.VerifyHash(this.HashData(data, offset, count, hashAlgorithm), signature, hashAlgorithm, padding));
 }
All Usage Examples Of System.Security.Cryptography.RSA::HashAlgorithmNameNullOrEmpty