RC5Parameters.cs 597 B

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