FiniteFieldDheGroup.cs 586 B

12345678910111213141516171819202122232425
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. namespace Org.BouncyCastle.Crypto.Tls
  4. {
  5. /*
  6. * draft-ietf-tls-negotiated-ff-dhe-01
  7. */
  8. public abstract class FiniteFieldDheGroup
  9. {
  10. public const byte ffdhe2432 = 0;
  11. public const byte ffdhe3072 = 1;
  12. public const byte ffdhe4096 = 2;
  13. public const byte ffdhe6144 = 3;
  14. public const byte ffdhe8192 = 4;
  15. public static bool IsValid(byte group)
  16. {
  17. return group >= ffdhe2432 && group <= ffdhe8192;
  18. }
  19. }
  20. }
  21. #endif