net6: warning SYSLIB0022

This commit is contained in:
Anton Suhorukov 2021-10-01 13:34:47 +03:00
parent 6988c4f997
commit 8409b10705
2 changed files with 11 additions and 12 deletions

View File

@ -58,7 +58,7 @@ namespace ASC.Core
public static string GetV(string data, int keyno, bool reverse)
{
var hasher = Rijndael.Create();
var hasher = Aes.Create();
hasher.Key = keyno == 1 ? GetSK1(false) : GetSK2(false);
hasher.IV = new byte[hasher.BlockSize >> 3];
@ -91,7 +91,7 @@ namespace ASC.Core
internal static byte[] GetV(byte[] data, int keyno, bool reverse)
{
var hasher = Rijndael.Create();
var hasher = Aes.Create();
hasher.Key = keyno == 1 ? GetSK1(false) : GetSK2(false);
hasher.IV = new byte[hasher.BlockSize >> 3];

View File

@ -187,15 +187,14 @@ namespace ASC.Data.Encryption
public SymmetricAlgorithm GetCryptographyAlgorithm()
{
return new RijndaelManaged
{
KeySize = keySize,
BlockSize = blockSize,
Key = Key,
IV = IV,
Padding = PaddingMode.PKCS7,
Mode = CipherMode.CBC
};
var aes = Aes.Create();
aes.KeySize = keySize;
aes.BlockSize = blockSize;
aes.Key = Key;
aes.IV = IV;
aes.Padding = PaddingMode.PKCS7;
aes.Mode = CipherMode.CBC;
return aes;
}
public void ComputeAndWriteHmacHash(Stream stream)