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,47 @@
using System;
using System.Security;
namespace GostCryptography.Base
{
/// <summary>
/// Базовый класс для всех алгоритмов генерации псевдослучайной последовательности (Pseudorandom Function, PRF) ГОСТ
/// </summary>
public abstract class GostPRF : IDisposable, IGostAlgorithm
{
/// <summary>
/// Конструктор
/// </summary>
/// <param name="providerType">Тип криптографического провайдера</param>
[SecuritySafeCritical]
protected GostPRF(ProviderType providerType)
{
ProviderType = providerType;
}
/// <inheritdoc />
public ProviderType ProviderType { get; }
/// <inheritdoc />
public abstract string AlgorithmName { get; }
/// <summary>
/// Освобождает неуправляемые ресурсы
/// </summary>
protected virtual void Dispose(bool disposing)
{
}
/// <inheritdoc />
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <inheritdoc />
~GostPRF()
{
Dispose(false);
}
}
}