Package jadex.platform.service.security
Interface ICryptoSuite
- 
 public interface ICryptoSuite
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]decryptAndAuth(byte[] content)Decrypt and authenticates the message from a sender.byte[]decryptAndAuthLocal(byte[] content)Decrypt and authenticates a locally encrypted message.byte[]encryptAndSign(byte[] content)Encrypts and signs the message for a receiver.longgetCreationTime()Returns the creation time of the crypto suite.java.lang.StringgetHandshakeId()Gets the ID used to identify the handshake of the suite.JadexVersiongetRemoteVersion()Gets the version of the remote Jadex platform.ISecurityInfogetSecurityInfos()Gets the security infos related to the authentication state.booleanhandleHandshake(SecurityAgent agent, BasicSecurityMessage incomingmessage)Handles handshake messages.booleanisExpiring()Returns if the suite is expiring and should be replaced.voidsetHandshakeId(java.lang.String id)Sets the ID used to identify the handshake of the suite.voidsetInitializer(boolean initializer)Sets if the suite represents the protocol initializer.voidsetRemoteVersion(JadexVersion jadexversion)Sets the version of the remote Jadex platform.
 
- 
- 
- 
Method Detail- 
encryptAndSignbyte[] encryptAndSign(byte[] content) Encrypts and signs the message for a receiver.- Parameters:
- content- The content
- Returns:
- Encrypted/signed message.
 
 - 
decryptAndAuthbyte[] decryptAndAuth(byte[] content) Decrypt and authenticates the message from a sender.- Parameters:
- content- The content.
- Returns:
- Decrypted/authenticated message or null on invalid message.
 
 - 
decryptAndAuthLocalbyte[] decryptAndAuthLocal(byte[] content) Decrypt and authenticates a locally encrypted message.- Parameters:
- content- The content.
- Returns:
- Decrypted/authenticated message or null on invalid message.
 
 - 
getSecurityInfosISecurityInfo getSecurityInfos() Gets the security infos related to the authentication state.- Returns:
- The security infos for decrypted messages.
 
 - 
isExpiringboolean isExpiring() Returns if the suite is expiring and should be replaced.- Returns:
- True, if the suite is expiring and should be replaced.
 
 - 
getCreationTimelong getCreationTime() Returns the creation time of the crypto suite.- Returns:
- The creation time.
 
 - 
handleHandshakeboolean handleHandshake(SecurityAgent agent, BasicSecurityMessage incomingmessage) Handles handshake messages.- Parameters:
- agent- The security agent object.
- incomingmessage- A message received from the other side of the handshake, set to null for initial message.
- Returns:
- True, if handshake continues, false when finished.
- Throws:
- java.lang.SecurityException- if handshake failed.
 
 - 
getHandshakeIdjava.lang.String getHandshakeId() Gets the ID used to identify the handshake of the suite.- Returns:
- Handshake ID.
 
 - 
setHandshakeIdvoid setHandshakeId(java.lang.String id) Sets the ID used to identify the handshake of the suite.- Parameters:
- id- Handshake ID.
 
 - 
getRemoteVersionJadexVersion getRemoteVersion() Gets the version of the remote Jadex platform.- Returns:
- The Jadex version.
 
 - 
setRemoteVersionvoid setRemoteVersion(JadexVersion jadexversion) Sets the version of the remote Jadex platform.- Parameters:
- jadexversion- The Jadex version.
 
 - 
setInitializervoid setInitializer(boolean initializer) Sets if the suite represents the protocol initializer.- Parameters:
- initializer- True, if initializer.
 
 
- 
 
-