ISignerWithRecovery.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.Text;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
  6. {
  7. /**
  8. * Signer with message recovery.
  9. */
  10. public interface ISignerWithRecovery
  11. : ISigner
  12. {
  13. /**
  14. * Returns true if the signer has recovered the full message as
  15. * part of signature verification.
  16. *
  17. * @return true if full message recovered.
  18. */
  19. bool HasFullMessage();
  20. /**
  21. * Returns a reference to what message was recovered (if any).
  22. *
  23. * @return full/partial message, null if nothing.
  24. */
  25. byte[] GetRecoveredMessage();
  26. /**
  27. * Perform an update with the recovered message before adding any other data. This must
  28. * be the first update method called, and calling it will result in the signer assuming
  29. * that further calls to update will include message content past what is recoverable.
  30. *
  31. * @param signature the signature that we are in the process of verifying.
  32. * @throws IllegalStateException
  33. */
  34. void UpdateWithRecoveredMessage(byte[] signature);
  35. }
  36. }
  37. #pragma warning restore
  38. #endif