| Modifier and Type | Field and Description |
|---|---|
protected java.security.Key |
mKey |
protected static java.lang.String |
TAG |
| Constructor and Description |
|---|
AESCrypto(java.security.Key key) |
| Modifier and Type | Method and Description |
|---|---|
static java.security.Key |
createKeyFromObjectData(byte[] data) |
byte[] |
decode(byte[] src)
解密
|
byte[] |
encode(byte[] src)
加密
|
byte[] |
encode(byte[] src,
int offset,
int len) |
static javax.crypto.SecretKey |
generateAESKey(byte[] seed,
int keyLength) |
java.security.Key |
getKey() |
static byte[] |
keyToByteArray(java.security.Key key) |
public static javax.crypto.SecretKey generateAESKey(byte[] seed,
int keyLength)
public static java.security.Key createKeyFromObjectData(byte[] data)
public static byte[] keyToByteArray(java.security.Key key)
public byte[] encode(byte[] src,
int offset,
int len)
public byte[] encode(byte[] src)
Cryptopublic byte[] decode(byte[] src)
Cryptopublic java.security.Key getKey()