|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.universaldevices.security.upnp.UPnPBulkCipher
public class UPnPBulkCipher
This class represents a bulk key cipher which is used to encrypt messages.
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";
Field Summary | |
---|---|
byte[] |
symIV
The symmetric IV |
byte[] |
symKey
The symmetric Key |
Constructor Summary | |
---|---|
UPnPBulkCipher()
Constructor Defaults to the parameters defined in UPnPSecurity |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public byte[] symKey
public byte[] symIV
Constructor Detail |
---|
public UPnPBulkCipher()
UPnPSecurity
Method Detail |
---|
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 object
public void refresh()
UPnPSecurity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |