public abstract class CipherSuite
extends java.lang.Object
Constructor and Description |
---|
CipherSuite(byte[] code)
Constructor for a ciphersuite
|
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateClientKeyExchange()
calculate the client keys (see RFC2246 Client Key Exchange)
|
void |
decode(TLSPlaintextRecord msg)
decodes a message with a symmetric key
|
void |
encode(TLSPlaintextRecord msg)
encodes a message with a symmetric key
|
byte[] |
getCipherSuiteCode()
returns the code of a ciphersuite (see RFC2246)
|
Key_Exchange |
getKeyExchangeAlgorithm()
gets the key exchange algorithm that is used
|
void |
processClientKeyExchange(java.math.BigInteger dh_y)
processes the client key exchange
|
void |
processServerFinished(TLSPlaintextRecord msg,
byte[] handshakemessages)
validates the finishedmessage and throws a Exception if a error occure
|
void |
setServerCertificate(JAPCertificate cert)
set the Server Certificate
|
java.lang.String |
toString() |
public CipherSuite(byte[] code) throws TLSException
code
- Code of the ciphersuite (see RFC2246)TLSException
public Key_Exchange getKeyExchangeAlgorithm()
public void setServerCertificate(JAPCertificate cert)
cert
- server certificatepublic byte[] getCipherSuiteCode()
public void processClientKeyExchange(java.math.BigInteger dh_y)
dh_y
- diffie hellman parameterpublic byte[] calculateClientKeyExchange() throws TLSException
TLSException
public void processServerFinished(TLSPlaintextRecord msg, byte[] handshakemessages) throws TLSException
finishedmessage
- the message that have to be validetedTLSException
public void encode(TLSPlaintextRecord msg)
message
- messagepublic void decode(TLSPlaintextRecord msg) throws TLSException
message
- messageTLSException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2023. All rights reserved.