public class CipherTransformer extends Object implements Transformer
Cipher| Modifier and Type | Field and Description |
|---|---|
static int |
AES_KIND |
static String |
AES_NAME |
| Constructor and Description |
|---|
CipherTransformer(String cipherName,
int kind)
Constructor for CipherTransformer.
|
| Modifier and Type | Method and Description |
|---|---|
RTPSByteBuffer |
decode(Key key,
SecurePayload payload)
Decodes a given SecurePayload
|
SecurePayload |
encode(Key key,
RTPSByteBuffer bb)
Encodes RTPSByteBuffer into SecurePayload.
|
String |
getName()
Gets the name of this transformer.
|
int |
getTransformationKind()
Gets the transformation kind used by this transformer.
|
public static final int AES_KIND
public static final String AES_NAME
public CipherTransformer(String cipherName, int kind) throws NoSuchAlgorithmException, NoSuchPaddingException
cipherName - Name of the transformationkind - transformationKindNoSuchAlgorithmException - on NoSuchAlgorithmExceptionNoSuchPaddingException - on NoSuchPaddingExceptionpublic int getTransformationKind()
TransformergetTransformationKind in interface Transformerpublic String getName()
TransformergetName in interface Transformerpublic SecurePayload encode(Key key, RTPSByteBuffer bb) throws SecurityException
Transformerencode in interface Transformerkey - Keybb - RTPSByteBuffer RTPSByteBuffer to encode. Position should be placed at
the end of buffer.SecurityException - on SecurityExceptionpublic RTPSByteBuffer decode(Key key, SecurePayload payload) throws SecurityException
Transformerdecode in interface Transformerkey - Keypayload - Payload to decodeSecurityException - on SecurityExceptionCopyright © 2016. All rights reserved.