mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
added test validating that an empty password cannot be passed to an encryptor
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Security;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Security.Factories;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework.Constraints;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Security;
|
||||
|
||||
|
||||
namespace mRemoteNGTests.Security
|
||||
@@ -97,6 +97,12 @@ namespace mRemoteNGTests.Security
|
||||
Assert.That(cryptoProvider.CipherMode, Is.EqualTo(mode));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ProvidingEmptyEncryptionKeyThrowsException()
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => _cryptographyProvider.Encrypt(_plainText, new SecureString()));
|
||||
}
|
||||
|
||||
|
||||
private class TestCaseSources
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user