<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />

AbstractTlsSecret

public abstract class AbstractTlsSecret : TlsSecret
Base class for a TlsSecret implementation which captures common code and fields.
protected byte[] m_data

protected abstract AbstractTlsCrypto Crypto { get; }

public virtual int Length { get; }

protected AbstractTlsSecret(byte[] data)

Base constructor.

protected static byte[] CopyData(AbstractTlsSecret other)

public virtual byte[] CalculateHmac(int cryptoHashAlgorithm, byte[] buf, int off, int len)

protected virtual void CheckAlive()

public abstract TlsSecret DeriveUsingPrf(int prfAlgorithm, string label, byte[] seed, int length)

public abstract TlsSecret DeriveUsingPrf(int prfAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<byte> seed, int length)

public virtual void Destroy()

public virtual byte[] Encrypt(TlsEncryptor encryptor)

public virtual byte[] Extract()

public virtual void ExtractTo(Span<byte> output)

public abstract TlsSecret HkdfExpand(int cryptoHashAlgorithm, byte[] info, int length)

public abstract TlsSecret HkdfExpand(int cryptoHashAlgorithm, ReadOnlySpan<byte> info, int length)

public abstract TlsSecret HkdfExtract(int cryptoHashAlgorithm, TlsSecret ikm)

public virtual bool IsAlive()