summary refs log tree commit diff
path: root/crypto/src/tls/TlsCredentialedDecryptor.cs
blob: 5fa021d4116ea54b6d55837094c617261cdfcebb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.IO;

using Org.BouncyCastle.Tls.Crypto;

namespace Org.BouncyCastle.Tls
{
    /// <summary>Base interface for a class that decrypts TLS secrets.</summary>
    public interface TlsCredentialedDecryptor
        : TlsCredentials
    {
        /// <summary>Decrypt the passed in cipher text using the parameters available.</summary>
        /// <param name="cryptoParams">the parameters to use for the decryption.</param>
        /// <param name="ciphertext">the cipher text containing the secret.</param>
        /// <returns>a TLS secret.</returns>
        /// <exception cref="IOException">on a parsing or decryption error.</exception>
        TlsSecret Decrypt(TlsCryptoParameters cryptoParams, byte[] ciphertext);
    }
}