public abstract class AbstractTlsCrypto extends java.lang.Object implements TlsCrypto
Constructor and Description |
---|
AbstractTlsCrypto() |
Modifier and Type | Method and Description |
---|---|
TlsSecret |
adoptSecret(TlsSecret secret)
Adopt the passed in secret, creating a new copy of it..
|
protected abstract TlsCipher |
createCipher(TlsCryptoParameters cryptoParams,
int encryptionAlgorithm,
int macAlgorithm)
Create a cipher for the specified encryption and MAC algorithms.
|
protected abstract TlsEncryptor |
createEncryptor(TlsCertificate certificate)
Return an encryptor based on the public key in certificate.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createCertificate, createDHDomain, createECDomain, createHash, createHMAC, createNonceGenerator, createSecret, createSRP6Client, createSRP6Server, createSRP6VerifierGenerator, generateRSAPreMasterSecret, getSecureRandom, hasAllRawSignatureAlgorithms, hasDHAgreement, hasECDHAgreement, hasEncryptionAlgorithm, hasHashAlgorithm, hasMacAlgorithm, hasNamedGroup, hasRSAEncryption, hasSignatureAlgorithm, hasSignatureAndHashAlgorithm, hasSRPAuthentication
public TlsSecret adoptSecret(TlsSecret secret)
adoptSecret
in interface TlsCrypto
secret
- the secret to make a copy of.protected abstract TlsCipher createCipher(TlsCryptoParameters cryptoParams, int encryptionAlgorithm, int macAlgorithm) throws java.io.IOException
See enumeration classes EncryptionAlgorithm
, MACAlgorithm
for appropriate argument values.
cryptoParams
- context specific parameters.encryptionAlgorithm
- the encryption algorithm to be employed by the cipher.macAlgorithm
- the MAC algorithm to be employed by the cipher.TlsCipher
implementing the encryption and MAC algorithm.java.io.IOException
protected abstract TlsEncryptor createEncryptor(TlsCertificate certificate) throws java.io.IOException
certificate
- the certificate carrying the public key.java.io.IOException