Package org.netxms.base
Class IceCrypto
java.lang.Object
org.netxms.base.IceCrypto
ICE encryption algorithm implementation
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintReturn the block size, in bytes.voidclear()Clear the key schedule to prevent memory snooping.static byte[]decrypt(byte[] in, byte[] key) Encrypt data using given key.voiddecryptBlock(byte[] ciphertext, byte[] plaintext) Decrypt a block of 8 bytes of data.static byte[]encrypt(byte[] in, byte[] key) Encrypt data using given key.voidencryptBlock(byte[] plaintext, byte[] ciphertext) Encrypt a block of 8 bytes of data.intkeySize()Return the key size, in bytes.voidset(byte[] key) Set the key schedule of an ICE key.
- 
Constructor Details- 
IceCryptopublic IceCrypto(int level) Create a new ICE key with the specified level.- Parameters:
- level- key level
 
 
- 
- 
Method Details- 
setpublic void set(byte[] key) Set the key schedule of an ICE key.- Parameters:
- key- new key
 
- 
clearpublic void clear()Clear the key schedule to prevent memory snooping.
- 
encryptBlockpublic void encryptBlock(byte[] plaintext, byte[] ciphertext) Encrypt a block of 8 bytes of data.- Parameters:
- plaintext- unencrypted data
- ciphertext- buffer for encrypted data
 
- 
decryptBlockpublic void decryptBlock(byte[] ciphertext, byte[] plaintext) Decrypt a block of 8 bytes of data.- Parameters:
- ciphertext- encrypted data
- plaintext- buffer for decrypted data
 
- 
keySizepublic int keySize()Return the key size, in bytes.- Returns:
- key size in bytes
 
- 
blockSizepublic int blockSize()Return the block size, in bytes.- Returns:
- block size in bytes
 
- 
encryptpublic static byte[] encrypt(byte[] in, byte[] key) Encrypt data using given key.- Parameters:
- in- clear text data
- key- encryption key
- Returns:
- encrypted data
 
- 
decryptpublic static byte[] decrypt(byte[] in, byte[] key) Encrypt data using given key.- Parameters:
- in- encrypted data
- key- encryption key
- Returns:
- clear text data
 
 
-