xlang v5.1 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Cipher.x
浏览该文件的文档.
1
5class Cipher {
32public @NotNilptr Cipher newInstance(String algorithm);
33
42public bool init(int mode, Key key, Object params);
43
52public int update(byte[] input, int offset, int length);
53
61public void updateAAD(byte[] aad, int offset, int length);
62
71public @NotNilptr byte[] transform(byte[] input, int offset, int length);
72
81public @NotNilptr byte[] doFinal(byte[] input, int offset, int length);
82
87public @NotNilptr byte[] getIV();
88
94public int getOutputSize(int inputLen);
95
100public int getBlockSize();
101
106public @NotNilptr String getAlgorithm();
107
111public void finalize();
112
119public static final @NotNilptr Cipher getInstance(String algorithm);
120
127public static final bool registryCipher(String algorithm, Cipher cipher);
128
133public static final @NotNilptr String getSupportAlgorithms();
134
135};
提供加密和解密操作的抽象类,支持多种加密算法和模式。
Definition Cipher.x:5
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对象使用的算法名称。
Definition Key.x:4
Definition Object.x:1
Definition String.x:5