mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Added required property to the ICryptographyProvider interface to get the underlying crypto algorithm
This commit is contained in:
@@ -37,6 +37,8 @@ namespace mRemoteNG.Security
|
||||
|
||||
public int BlockSizeInBytes => _aeadBlockCipher.GetBlockSize();
|
||||
|
||||
public string CipherEngine => _aeadBlockCipher.AlgorithmName;
|
||||
|
||||
public AeadCryptographyProvider()
|
||||
{
|
||||
_aeadBlockCipher = new GcmBlockCipher(new AesFastEngine());
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace mRemoteNG.Security
|
||||
|
||||
public int BlockSizeInBytes => _aesEngine.GetBlockSize();
|
||||
|
||||
public string CipherEngine => _aesEngine.AlgorithmName;
|
||||
|
||||
public AesCryptographyProvider()
|
||||
{
|
||||
_aesEngine = new AesEngine();
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace mRemoteNG.Security
|
||||
|
||||
public int BlockSizeInBytes => _blockCipher.GetBlockSize();
|
||||
|
||||
public string CipherEngine => _blockCipher.AlgorithmName;
|
||||
|
||||
public Encryptor()
|
||||
{
|
||||
_encoding = Encoding.UTF8;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user