Package org.bouncycastle.tls.crypto.impl
Class AbstractTlsCrypto
java.lang.Object
org.bouncycastle.tls.crypto.impl.AbstractTlsCrypto
- All Implemented Interfaces:
TlsCrypto
- Direct Known Subclasses:
BcTlsCrypto,JcaTlsCrypto
Base class for a TlsCrypto implementation that provides some needed methods from elsewhere in the impl package.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadoptSecret(TlsSecret secret) Adopt the passed in secret, creating a new copy of it..protected abstract TlsEncryptorcreateEncryptor(TlsCertificate certificate) Return an encryptor based on the public key in certificate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bouncycastle.tls.crypto.TlsCrypto
createCertificate, createCipher, createDHDomain, createECDomain, createHash, createHMAC, createHMAC, createNonceGenerator, createSecret, createSRP6Client, createSRP6Server, createSRP6VerifierGenerator, generateRSAPreMasterSecret, getSecureRandom, hasAllRawSignatureAlgorithms, hasDHAgreement, hasECDHAgreement, hasEncryptionAlgorithm, hasHashAlgorithm, hasMacAlgorithm, hasNamedGroup, hasRSAEncryption, hasSignatureAlgorithm, hasSignatureAndHashAlgorithm, hasSignatureScheme, hasSRPAuthentication, hkdfInit
-
Constructor Details
-
AbstractTlsCrypto
public AbstractTlsCrypto()
-
-
Method Details
-
adoptSecret
Adopt the passed in secret, creating a new copy of it..- Specified by:
adoptSecretin interfaceTlsCrypto- Parameters:
secret- the secret to make a copy of.- Returns:
- a TlsSecret based the original secret.
-
createEncryptor
Return an encryptor based on the public key in certificate.- Parameters:
certificate- the certificate carrying the public key.- Returns:
- a TlsEncryptor based on the certificate's public key.
- Throws:
IOException
-