RC5Parameters.cs 691 B

12345678910111213141516171819202122232425262728293031
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
  6. {
  7. public class RC5Parameters
  8. : KeyParameter
  9. {
  10. private readonly int rounds;
  11. public RC5Parameters(
  12. byte[] key,
  13. int rounds)
  14. : base(key)
  15. {
  16. if (key.Length > 255)
  17. throw new ArgumentException("RC5 key length can be no greater than 255");
  18. this.rounds = rounds;
  19. }
  20. public int Rounds
  21. {
  22. get { return rounds; }
  23. }
  24. }
  25. }
  26. #pragma warning restore
  27. #endif