Esempio n. 1
0
 internal static void ValidateSymmetricKeyLength(int keyLength, SecurityAlgorithmSuite algorithmSuite)
 {
     if (!algorithmSuite.IsSymmetricKeyLengthSupported(keyLength))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite",
            SR.GetString(SR.UnsupportedKeyLength, keyLength, algorithmSuite.ToString())));
     }
     if (keyLength % 8 != 0)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite",
            SR.GetString(SR.KeyLengthMustBeMultipleOfEight, keyLength)));
     }
 }
 internal static void ValidateSymmetricKeyLength(int keyLength, SecurityAlgorithmSuite algorithmSuite)
 {
     if (!algorithmSuite.IsSymmetricKeyLengthSupported(keyLength))
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite", System.ServiceModel.SR.GetString("UnsupportedKeyLength", new object[] { keyLength, algorithmSuite.ToString() })));
     }
     if ((keyLength % 8) != 0)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite", System.ServiceModel.SR.GetString("KeyLengthMustBeMultipleOfEight", new object[] { keyLength })));
     }
 }
Esempio n. 3
0
 internal static void ValidateSymmetricKeyLength(int keyLength, SecurityAlgorithmSuite algorithmSuite)
 {
     if (!algorithmSuite.IsSymmetricKeyLengthSupported(keyLength))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite",
                                                                                                     SR.GetString(SR.UnsupportedKeyLength, keyLength, algorithmSuite.ToString())));
     }
     if (keyLength % 8 != 0)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite",
                                                                                                     SR.GetString(SR.KeyLengthMustBeMultipleOfEight, keyLength)));
     }
 }
Esempio n. 4
0
 internal static void ValidateSymmetricKeyLength(int keyLength, SecurityAlgorithmSuite algorithmSuite)
 {
     if (!algorithmSuite.IsSymmetricKeyLengthSupported(keyLength))
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite", System.ServiceModel.SR.GetString("UnsupportedKeyLength", new object[] { keyLength, algorithmSuite.ToString() })));
     }
     if ((keyLength % 8) != 0)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ArgumentOutOfRangeException("algorithmSuite", System.ServiceModel.SR.GetString("KeyLengthMustBeMultipleOfEight", new object[] { keyLength })));
     }
 }