IVerifier.cs 1.3 KB

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