IesParameters.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. /**
  7. * parameters for using an integrated cipher in stream mode.
  8. */
  9. public class IesParameters : ICipherParameters
  10. {
  11. private byte[] derivation;
  12. private byte[] encoding;
  13. private int macKeySize;
  14. /**
  15. * @param derivation the derivation parameter for the KDF function.
  16. * @param encoding the encoding parameter for the KDF function.
  17. * @param macKeySize the size of the MAC key (in bits).
  18. */
  19. public IesParameters(
  20. byte[] derivation,
  21. byte[] encoding,
  22. int macKeySize)
  23. {
  24. this.derivation = derivation;
  25. this.encoding = encoding;
  26. this.macKeySize = macKeySize;
  27. }
  28. public byte[] GetDerivationV()
  29. {
  30. return derivation;
  31. }
  32. public byte[] GetEncodingV()
  33. {
  34. return encoding;
  35. }
  36. public int MacKeySize
  37. {
  38. get
  39. {
  40. return macKeySize;
  41. }
  42. }
  43. }
  44. }
  45. #endif