52public int update(
byte[] input,
int offset,
int length);
61public void updateAAD(
byte[] aad,
int offset,
int length);
71public @NotNilptr
byte[]
transform(
byte[] input,
int offset,
int length);
81public @NotNilptr
byte[]
doFinal(
byte[] input,
int offset,
int length);
87public @NotNilptr
byte[]
getIV();
提供加密和解密操作的抽象类,支持多种加密算法和模式。
byte [] transform(byte[] input, int offset, int length)
对输入数据进行加密或解密转换。
int getOutputSize(int inputLen)
获取指定输入长度对应的输出长度。
Cipher newInstance(String algorithm)
创建指定算法的Cipher实例。
void finalize()
释放Cipher对象相关资源。
void updateAAD(byte[] aad, int offset, int length)
更新附加认证数据(AAD),用于认证加密模式。
byte [] getIV()
获取当前Cipher对象的初始化向量(IV)。
byte [] doFinal(byte[] input, int offset, int length)
完成加密或解密操作,处理剩余数据。
bool init(int mode, Key key, Object params)
初始化Cipher对象。
static final String getSupportAlgorithms()
获取当前支持的所有加密算法名称列表。
static final bool registryCipher(String algorithm, Cipher cipher)
注册自定义Cipher实现到算法注册表。
int update(byte[] input, int offset, int length)
更新输入数据,处理部分数据块。
static final Cipher getInstance(String algorithm)
获取指定算法的Cipher实例(单例)。
int getBlockSize()
获取加密算法的块大小(字节数)。
String getAlgorithm()
获取当前Cipher对象使用的算法名称。