using GostCryptography.Base;
using GostCryptography.Gost_28147_89;
using System.Security;
namespace GostCryptography.Gost_R3411
{
///
/// Реализация PRF на базе алгоритма хэширования ГОСТ Р 34.11-2012/512
///
public sealed class Gost_R3411_2012_512_PRF : Gost_R3411_PRF
{
///
/// Наименование алгоритма PRF на базе ГОСТ Р 34.11-2012/512 для использования в протоколе WS-Trust
///
public const string WsTrustAlgorithmNameValue = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:ck-p-gostr3411-2012-512";
///
/// Наименование алгоритма PRF на базе ГОСТ Р 34.11-2012/512 для использования в протоколах на базе WS-SecureConversation
///
public const string WsSecureConversationAlgorithmNameValue = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:dk-p-gostr3411-2012-512";
///
/// Известные наименования алгоритма PRF на базе ГОСТ Р 34.11-2012/512
///
public static readonly string[] KnownAlgorithmNames = { WsTrustAlgorithmNameValue, WsSecureConversationAlgorithmNameValue };
///
[SecuritySafeCritical]
public Gost_R3411_2012_512_PRF(Gost_28147_89_SymmetricAlgorithmBase key, byte[] label, byte[] seed) : base(key, label, seed)
{
}
///
[SecuritySafeCritical]
public Gost_R3411_2012_512_PRF(ProviderType providerType, byte[] key, byte[] label, byte[] seed) : base(providerType, key, label, seed)
{
}
///
public override string AlgorithmName => WsTrustAlgorithmNameValue;
///
[SecuritySafeCritical]
protected override Gost_R3411_2012_512_HMAC CreateHMAC(Gost_28147_89_SymmetricAlgorithm key)
{
return new Gost_R3411_2012_512_HMAC(key);
}
}
}