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

PrfAlgorithm

public abstract class PrfAlgorithm
RFC 5246
namespace Org.BouncyCastle.Tls { public abstract class PrfAlgorithm { public const int ssl_prf_legacy = 0; public const int tls_prf_legacy = 1; public const int tls_prf_sha256 = 2; public const int tls_prf_sha384 = 3; public const int tls13_hkdf_sha256 = 4; public const int tls13_hkdf_sha384 = 5; public const int tls13_hkdf_sm3 = 7; public const int tls_prf_gostr3411_2012_256 = 8; public static string GetName(int prfAlgorithm) { switch (prfAlgorithm) { case 0: return "ssl_prf_legacy"; case 1: return "tls_prf_legacy"; case 2: return "tls_prf_sha256"; case 3: return "tls_prf_sha384"; case 4: return "tls13_hkdf_sha256"; case 5: return "tls13_hkdf_sha384"; case 7: return "tls13_hkdf_sm3"; case 8: return "tls_prf_gostr3411_2012_256"; default: return "UNKNOWN"; } } public static string GetText(int prfAlgorithm) { return GetName(prfAlgorithm) + "(" + prfAlgorithm.ToString() + ")"; } } }