EncryptionAlgorithm.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. namespace Org.BouncyCastle.Crypto.Tls
  4. {
  5. /// <summary>RFC 2246</summary>
  6. /// <remarks>
  7. /// Note that the values here are implementation-specific and arbitrary. It is recommended not to
  8. /// depend on the particular values (e.g. serialization).
  9. /// </remarks>
  10. public abstract class EncryptionAlgorithm
  11. {
  12. public const int NULL = 0;
  13. public const int RC4_40 = 1;
  14. public const int RC4_128 = 2;
  15. public const int RC2_CBC_40 = 3;
  16. public const int IDEA_CBC = 4;
  17. public const int DES40_CBC = 5;
  18. public const int DES_CBC = 6;
  19. public const int cls_3DES_EDE_CBC = 7;
  20. /*
  21. * RFC 3268
  22. */
  23. public const int AES_128_CBC = 8;
  24. public const int AES_256_CBC = 9;
  25. /*
  26. * RFC 5289
  27. */
  28. public const int AES_128_GCM = 10;
  29. public const int AES_256_GCM = 11;
  30. /*
  31. * RFC 4132
  32. */
  33. public const int CAMELLIA_128_CBC = 12;
  34. public const int CAMELLIA_256_CBC = 13;
  35. /*
  36. * RFC 4162
  37. */
  38. public const int SEED_CBC = 14;
  39. /*
  40. * RFC 6655
  41. */
  42. public const int AES_128_CCM = 15;
  43. public const int AES_128_CCM_8 = 16;
  44. public const int AES_256_CCM = 17;
  45. public const int AES_256_CCM_8 = 18;
  46. /*
  47. * RFC 6367
  48. */
  49. public const int CAMELLIA_128_GCM = 19;
  50. public const int CAMELLIA_256_GCM = 20;
  51. /*
  52. * draft-ietf-tls-chacha20-poly1305-04
  53. */
  54. public const int CHACHA20_POLY1305 = 102;
  55. [Obsolete] public const int AEAD_CHACHA20_POLY1305 = CHACHA20_POLY1305;
  56. /*
  57. * draft-zauner-tls-aes-ocb-04
  58. */
  59. public const int AES_128_OCB_TAGLEN96 = 103;
  60. public const int AES_256_OCB_TAGLEN96 = 104;
  61. }
  62. }
  63. #endif