TlsSigner.cs 966 B

1234567891011121314151617181920212223
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
  6. {
  7. /// <summary>Base interface for a TLS signer that works on raw message digests.</summary>
  8. public interface TlsSigner
  9. {
  10. /// <summary>Generate an encoded signature based on the passed in hash.</summary>
  11. /// <param name="algorithm">the signature algorithm to use.</param>
  12. /// <param name="hash">the hash calculated for the signature.</param>
  13. /// <returns>an encoded signature.</returns>
  14. /// <exception cref="IOException">in case of an exception processing the hash.</exception>
  15. byte[] GenerateRawSignature(SignatureAndHashAlgorithm algorithm, byte[] hash);
  16. /// <exception cref="IOException"/>
  17. TlsStreamSigner GetStreamSigner(SignatureAndHashAlgorithm algorithm);
  18. }
  19. }
  20. #pragma warning restore
  21. #endif