IVerifier.cs 1.2 KB

12345678910111213141516171819202122232425262728
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. namespace Org.BouncyCastle.Crypto
  3. {
  4. /// <summary>
  5. /// Operators that reduce their input to the validation of a signature produce this type.
  6. /// </summary>
  7. public interface IVerifier
  8. {
  9. /// <summary>
  10. /// Return true if the passed in data matches what is expected by the verification result.
  11. /// </summary>
  12. /// <param name="data">The bytes representing the signature.</param>
  13. /// <returns>true if the signature verifies, false otherwise.</returns>
  14. bool IsVerified(byte[] data);
  15. /// <summary>
  16. /// Return true if the length bytes from off in the source array match the signature
  17. /// expected by the verification result.
  18. /// </summary>
  19. /// <param name="source">Byte array containing the signature.</param>
  20. /// <param name="off">The offset into the source array where the signature starts.</param>
  21. /// <param name="length">The number of bytes in source making up the signature.</param>
  22. /// <returns>true if the signature verifies, false otherwise.</returns>
  23. bool IsVerified(byte[] source, int off, int length);
  24. }
  25. }
  26. #endif