KdfParameters.cs 784 B

12345678910111213141516171819202122232425262728293031323334353637
  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. /**
  8. * parameters for Key derivation functions for IEEE P1363a
  9. */
  10. public class KdfParameters : IDerivationParameters
  11. {
  12. byte[] iv;
  13. byte[] shared;
  14. public KdfParameters(
  15. byte[] shared,
  16. byte[] iv)
  17. {
  18. this.shared = shared;
  19. this.iv = iv;
  20. }
  21. public byte[] GetSharedSecret()
  22. {
  23. return shared;
  24. }
  25. public byte[] GetIV()
  26. {
  27. return iv;
  28. }
  29. }
  30. }
  31. #pragma warning restore
  32. #endif