Package net.sf.gridarta.utils
Class Xtea
- java.lang.Object
-
- net.sf.gridarta.utils.Xtea
-
public class Xtea extends java.lang.ObjectImplements the XTEA algorithm.
-
-
Constructor Summary
Constructors Constructor Description Xtea(byte @NotNull [] key)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecrypt(byte @NotNull [] ciphertext, byte @NotNull [] plaintext)Decrypts a data block.voidencrypt(byte @NotNull [] plaintext, byte @NotNull [] ciphertext)Encrypts a data block.
-
-
-
Method Detail
-
encrypt
public void encrypt(byte @NotNull [] plaintext, byte @NotNull [] ciphertext)Encrypts a data block.- Parameters:
plaintext- the block to encrypt; must be 8 bytesciphertext- the encrypted block; must be 8 bytes
-
decrypt
public void decrypt(byte @NotNull [] ciphertext, byte @NotNull [] plaintext)Decrypts a data block.- Parameters:
ciphertext- the block to decrypt; must be 8 bytesplaintext- the decrypted block; must be 8 bytes
-
-