TlsCredentialedDecryptor.cs 923 B

1234567891011121314151617181920212223
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. using BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto;
  6. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls
  7. {
  8. /// <summary>Base interface for a class that decrypts TLS secrets.</summary>
  9. public interface TlsCredentialedDecryptor
  10. : TlsCredentials
  11. {
  12. /// <summary>Decrypt the passed in cipher text using the parameters available.</summary>
  13. /// <param name="cryptoParams">the parameters to use for the decryption.</param>
  14. /// <param name="ciphertext">the cipher text containing the secret.</param>
  15. /// <returns>a TLS secret.</returns>
  16. /// <exception cref="IOException">on a parsing or decryption error.</exception>
  17. TlsSecret Decrypt(TlsCryptoParameters cryptoParams, byte[] ciphertext);
  18. }
  19. }
  20. #pragma warning restore
  21. #endif