IDerivationFunction.cs 727 B

123456789101112131415161718192021222324252627
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto
  5. {
  6. /**
  7. * base interface for general purpose byte derivation functions.
  8. */
  9. public interface IDerivationFunction
  10. {
  11. void Init(IDerivationParameters parameters);
  12. /**
  13. * return the message digest used as the basis for the function
  14. */
  15. IDigest Digest { get; }
  16. int GenerateBytes(byte[] output, int outOff, int length);
  17. #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
  18. int GenerateBytes(Span<byte> output);
  19. #endif
  20. }
  21. }
  22. #pragma warning restore
  23. #endif