Class BcDefaultTlsCredentialedDecryptor
Credentialed class decrypting RSA encrypted secrets sent from a peer for our end of the TLS connection using the BC light-weight API.
public class BcDefaultTlsCredentialedDecryptor : TlsCredentialedDecryptor, TlsCredentials
- Inheritance
-
BcDefaultTlsCredentialedDecryptor
- Implements
- Inherited Members
Constructors
BcDefaultTlsCredentialedDecryptor(BcTlsCrypto, Certificate, AsymmetricKeyParameter)
public BcDefaultTlsCredentialedDecryptor(BcTlsCrypto crypto, Certificate certificate, AsymmetricKeyParameter privateKey)
Parameters
cryptoBcTlsCryptocertificateCertificateprivateKeyAsymmetricKeyParameter
Fields
m_certificate
protected readonly Certificate m_certificate
Field Value
m_crypto
protected readonly BcTlsCrypto m_crypto
Field Value
m_privateKey
protected readonly AsymmetricKeyParameter m_privateKey
Field Value
Properties
Certificate
Return the certificate structure representing our identity.
public virtual Certificate Certificate { get; }
Property Value
- Certificate
our certificate structure.
Methods
Decrypt(TlsCryptoParameters, byte[])
Decrypt the passed in cipher text using the parameters available.
public virtual TlsSecret Decrypt(TlsCryptoParameters cryptoParams, byte[] ciphertext)
Parameters
cryptoParamsTlsCryptoParametersthe parameters to use for the decryption.
ciphertextbyte[]the cipher text containing the secret.
Returns
- TlsSecret
a TLS secret.
Exceptions
- IOException
on a parsing or decryption error.
SafeDecryptPreMasterSecret(TlsCryptoParameters, RsaKeyParameters, byte[])
protected virtual TlsSecret SafeDecryptPreMasterSecret(TlsCryptoParameters cryptoParams, RsaKeyParameters rsaServerPrivateKey, byte[] encryptedPreMasterSecret)
Parameters
cryptoParamsTlsCryptoParametersrsaServerPrivateKeyRsaKeyParametersencryptedPreMasterSecretbyte[]