|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.baidubce.services.iothisk.device.crypto.AesEncrypt
public class AesEncrypt
Provides AES crypto functions
| Constructor Summary | |
|---|---|
AesEncrypt()
|
|
| Method Summary | |
|---|---|
static byte[] |
decrypt(byte[] data,
SecretKey key,
IvParameterSpec iv,
String cipherName)
Decrypt message with specified secret key, cipher name, init vector and cipher name. |
static byte[] |
decryptByCTRNoPadding(byte[] data,
byte[] key,
byte[] iv)
Decrypt message with AES/CTR/NoPadding cipher |
static byte[] |
encrypt(byte[] data,
SecretKey key,
IvParameterSpec iv,
String cipherName)
Encrypt message with specified secret key, cipher name, init vector and cipher name. |
static byte[] |
encrypt(byte[] data,
SecretKey key,
String cipherName)
Encrypt message with specified secret key and cipher name. |
static byte[] |
encryptByCTRNoPadding(byte[] data,
byte[] key,
byte[] iv)
Encrypt message with AES/CTR/NoPadding cipher |
static SecretKey |
loadKey(byte[] key,
String algorithm)
Load secret key with provided key data and specified algorithm |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AesEncrypt()
| Method Detail |
|---|
public static SecretKey loadKey(byte[] key,
String algorithm)
key - specified key data in btye arrayalgorithm - specified algorithm
public static byte[] encrypt(byte[] data,
SecretKey key,
String cipherName)
data - specified message data in byte arraykey - specified secret keycipherName - specified cipher name
public static byte[] encrypt(byte[] data,
SecretKey key,
IvParameterSpec iv,
String cipherName)
data - specified message data in byte arraykey - specified secret keyiv - specified init vectorcipherName - specified cipher name
public static byte[] decrypt(byte[] data,
SecretKey key,
IvParameterSpec iv,
String cipherName)
data - specified cipher message data in byte arraykey - specified secret keyiv - specified init vectorcipherName - specified cipher name
public static byte[] encryptByCTRNoPadding(byte[] data,
byte[] key,
byte[] iv)
data - specified message data in byte arraykey - specified key in byte arrayiv - specified init vector
public static byte[] decryptByCTRNoPadding(byte[] data,
byte[] key,
byte[] iv)
data - specified message data in byte arraykey - specified key in byte arrayiv - specified init vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||