Added required property to the ICryptographyProvider interface to get the underlying crypto algorithm

This commit is contained in:
David Sparer
2016-07-11 18:06:28 -06:00
parent dd783c2dc0
commit 12165ac9a6
4 changed files with 8 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ namespace mRemoteNG.Security
public int BlockSizeInBytes => _aeadBlockCipher.GetBlockSize();
public string CipherEngine => _aeadBlockCipher.AlgorithmName;
public AeadCryptographyProvider()
{
_aeadBlockCipher = new GcmBlockCipher(new AesFastEngine());

View File

@@ -12,6 +12,8 @@ namespace mRemoteNG.Security
public int BlockSizeInBytes => _aesEngine.GetBlockSize();
public string CipherEngine => _aesEngine.AlgorithmName;
public AesCryptographyProvider()
{
_aesEngine = new AesEngine();

View File

@@ -24,6 +24,8 @@ namespace mRemoteNG.Security
public int BlockSizeInBytes => _blockCipher.GetBlockSize();
public string CipherEngine => _blockCipher.AlgorithmName;
public Encryptor()
{
_encoding = Encoding.UTF8;

View File

@@ -6,6 +6,8 @@ namespace mRemoteNG.Security
{
int BlockSizeInBytes { get; }
string CipherEngine { get; }
string Encrypt(string plainText, SecureString encryptionKey);
string Decrypt(string cipherText, SecureString decryptionKey);