KdfParameters.cs 800 B

1234567891011121314151617181920212223242526272829303132333435
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
  5. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
  6. {
  7. /**
  8. * parameters for Key derivation functions for IEEE P1363a
  9. */
  10. public class KdfParameters
  11. : IDerivationParameters
  12. {
  13. private readonly byte[] m_iv;
  14. private readonly byte[] m_shared;
  15. public KdfParameters(byte[] shared, byte[] iv)
  16. {
  17. m_shared = shared;
  18. m_iv = iv;
  19. }
  20. public byte[] GetSharedSecret()
  21. {
  22. return m_shared;
  23. }
  24. public byte[] GetIV()
  25. {
  26. return m_iv;
  27. }
  28. }
  29. }
  30. #pragma warning restore
  31. #endif