public class XTEA extends Object implements BlockCipher
This implementation uses 32 rounds. The best attack reported as of 2009 is 36 rounds (Wikipedia).
ALIGN| 构造器和说明 |
|---|
XTEA() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
decrypt(byte[] bytes,
int off,
int len)
Decrypt a number of bytes.
|
void |
encrypt(byte[] bytes,
int off,
int len)
Encrypt a number of bytes.
|
int |
getKeyLength()
Get the length of the key in bytes.
|
void |
setKey(byte[] b)
Set the encryption key used for encrypting and decrypting.
|
public void setKey(byte[] b)
BlockCiphersetKey 在接口中 BlockCipherb - the keypublic void encrypt(byte[] bytes,
int off,
int len)
BlockCipherencrypt 在接口中 BlockCipherbytes - the byte arrayoff - the start indexlen - the number of bytes to encryptpublic void decrypt(byte[] bytes,
int off,
int len)
BlockCipherdecrypt 在接口中 BlockCipherbytes - the byte arrayoff - the start indexlen - the number of bytes to decryptpublic int getKeyLength()
BlockCiphergetKeyLength 在接口中 BlockCipherCopyright © 2022. All rights reserved.