Add project

Basic formatting applied. Unnecessary comments have been removed. Suspicious code is covered by TODO.
This commit is contained in:
2025-08-12 11:21:10 +09:00
parent bbcbe841a7
commit 33ab055b43
546 changed files with 176950 additions and 0 deletions

View File

@ -0,0 +1,39 @@
using GostCryptography.Config;
using System.Security;
using System.Security.Cryptography;
namespace GostCryptography.Base
{
/// <summary>
/// Базовый класс для всех алгоритмов симметричного шифрования ГОСТ
/// </summary>
public abstract class GostSymmetricAlgorithm : SymmetricAlgorithm, IGostAlgorithm
{
/// <summary>
/// Конструктор
/// </summary>
/// <remarks>
/// По умолчанию использует криптографический провайдер, установленный в <see cref="GostCryptoConfig.ProviderType"/>
/// </remarks>
[SecuritySafeCritical]
protected GostSymmetricAlgorithm() : this(GostCryptoConfig.ProviderType)
{
}
/// <summary>
/// Конструктор
/// </summary>
/// <param name="providerType">Тип криптографического провайдера</param>
[SecuritySafeCritical]
protected GostSymmetricAlgorithm(ProviderType providerType)
{
ProviderType = providerType;
}
/// <inheritdoc />
public ProviderType ProviderType { get; }
/// <inheritdoc />
public abstract string AlgorithmName { get; }
}
}