using GostCryptography.Config; using System.Security; using System.Security.Cryptography; namespace GostCryptography.Base { /// /// Базовый класс для всех алгоритмов хэширования ГОСТ на основе ключей /// public abstract class GostKeyedHashAlgorithm : KeyedHashAlgorithm, IGostAlgorithm { /// /// Конструктор /// /// Размер хэш-кода в битах /// /// По умолчанию использует криптографический провайдер, установленный в /// [SecuritySafeCritical] protected GostKeyedHashAlgorithm(int hashSize) : this(GostCryptoConfig.ProviderType, hashSize) { } /// /// Конструктор /// /// Тип криптографического провайдера /// Размер хэш-кода в битах [SecuritySafeCritical] protected GostKeyedHashAlgorithm(ProviderType providerType, int hashSize) { ProviderType = providerType; HashSizeValue = hashSize; } /// public ProviderType ProviderType { get; } /// public abstract string AlgorithmName { get; } } }