public abstract class ConfidentialityAlgorithm
extends java.lang.Object
Constructor and Description |
---|
ConfidentialityAlgorithm() |
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
decrypt(byte[] data)
Decrypts the data.
|
abstract byte[] |
encrypt(byte[] data)
Encrypts the data.
|
abstract byte |
getCode()
Returns the algorithm's ID.
|
abstract int |
getConfidentialityOverheadSize(int payloadSize)
Calculates size of the confidentiality header and trailer specific for
the algorithm.
|
void |
initialize(byte[] sik)
Initializes Confidentiality Algorithm
|
public void initialize(byte[] sik) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException
sik
- - Session Integrity Key calculated during the opening of the
session or user password if 'one-key' logins are enabled.java.security.InvalidKeyException
- - when initiation of the algorithm failsjava.security.NoSuchAlgorithmException
- - when initiation of the algorithm failsjavax.crypto.NoSuchPaddingException
- - when initiation of the algorithm failspublic abstract byte getCode()
public abstract byte[] encrypt(byte[] data) throws java.security.InvalidKeyException
data
- - payload to be encryptedjava.security.InvalidKeyException
- - when initiation of the algorithm failspublic abstract byte[] decrypt(byte[] data) throws java.lang.IllegalArgumentException
data
- - encrypted data encapsulated in COnfidentiality Header and
Trailer.java.lang.IllegalArgumentException
- - when initiation of the algorithm failspublic abstract int getConfidentialityOverheadSize(int payloadSize)
payloadSize
- - size of the data that will be encrypted