public class AlgorithmHandler extends Object
| Constructor and Description |
|---|
AlgorithmHandler(CryptoAlgorithm algorithm,
SecretKey keySpec,
int mode) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
cipherData(byte[] iv,
byte[] contentAad,
byte[] content,
int off,
int len)
使用
Cipher 处理数据 |
void |
cipherInit(byte[] iv) |
byte[] |
doFinal() |
CryptoAlgorithm |
getAlgorithm() |
byte[] |
headerGcmEncrypt(byte[] iv,
byte[] contentAad,
byte[] content,
int off,
int len) |
byte[] |
update(byte[] content,
int off,
int len) |
void |
updateAAD(byte[] contentAad) |
public AlgorithmHandler(CryptoAlgorithm algorithm, SecretKey keySpec, int mode)
public CryptoAlgorithm getAlgorithm()
public void cipherInit(byte[] iv)
public byte[] cipherData(byte[] iv,
byte[] contentAad,
byte[] content,
int off,
int len)
Cipher 处理数据iv - 随机向量contentAad - 身份验证数据content - 需要处理的数据off - 需要处理数据的偏移量len - 需要处理数据的长度public void updateAAD(byte[] contentAad)
public byte[] update(byte[] content,
int off,
int len)
public byte[] doFinal()
public byte[] headerGcmEncrypt(byte[] iv,
byte[] contentAad,
byte[] content,
int off,
int len)
Copyright © 2020. All rights reserved.