public class UPnPBulkCipher
extends java.lang.Object
As of right now, the current supported bulk key algorithm is the following
UPnPSecurity.BULK_CIPHER_NAME
="AES";
UPnPSecurity.BLOCK_CIPHER_MODE
="CFB";
UPnPSecurity.BLOCK_CIPHER_PADDING
="NoPadding";
UPnPSecurity.BULK_CIPHER_PARAMETERS
= BULK_CIPHER_NAME+"/"+BLOCK_CIPHER_MODE+"/"+BLOCK_CIPHER_PADDING;
UPnPSecurity.BULK_CIPHER_LENGTH
= 128; //in bytes
UPnPSecurity.DEFAULT_DEVICE_BULK_ALGORITHM
= "AES-128-CFB";
Modifier and Type | Field and Description |
---|---|
byte[] |
symIV
The symmetric IV
|
byte[] |
symKey
The symmetric Key
|
Constructor and Description |
---|
UPnPBulkCipher()
Constructor
Defaults to the parameters defined in
UPnPSecurity |
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] cipherText,
byte[] iv)
Decrypts the given data using an IV
|
byte[] |
encrypt(byte[] msg,
boolean useParams)
Encrypts the given data
|
byte[] |
getKeyAndIV()
Returns the Key and IV (initial vector) for this cipher
|
void |
refresh()
Refreshes this object based on the parameters as defined
in
UPnPSecurity |
public byte[] symKey
public byte[] symIV
public UPnPBulkCipher()
UPnPSecurity
public byte[] getKeyAndIV()
public byte[] decrypt(byte[] cipherText, byte[] iv)
cipherText
- - the text to be decryptediv
- - the initial vector (IV)public byte[] encrypt(byte[] msg, boolean useParams)
msg
- - the message to be encrypteduseParams
- - whether or not to use the parameters already initialized
in this objectpublic void refresh()
UPnPSecurity