ISignerWithRecovery.cs 1.1 KB

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