调整注释和readme
This commit is contained in:
@@ -6,11 +6,9 @@ import static com.zuc.zuc256.Zuc256Util.extractIv;
|
||||
import static com.zuc.zuc256.Zuc256Util.printHex;
|
||||
|
||||
|
||||
// 一次性加密函数
|
||||
|
||||
|
||||
/**
|
||||
* 演示主函数:保持与你的单文件示例一致的调用路径。
|
||||
* 演示主函数
|
||||
*/
|
||||
public final class Zuc256Demo {
|
||||
|
||||
|
||||
@@ -9,20 +9,26 @@ import static com.zuc.zuc256.Zuc256Util.putU32;
|
||||
|
||||
|
||||
/**
|
||||
* 分段加/解密上下文(流密码:同一流程)。
|
||||
* 注意:JavaCard 上尽量复用缓冲,避免额外分配。
|
||||
* 加密上下文类
|
||||
*/
|
||||
public final class Zuc256EncryptCtx {
|
||||
Zuc256State state = new Zuc256State();
|
||||
byte[] buf = new byte[4];
|
||||
Zuc256State state;
|
||||
byte[] buf;
|
||||
int buflen;
|
||||
|
||||
public Zuc256EncryptCtx(Zuc256State state, byte[] buf){
|
||||
this.state = state;
|
||||
this.buf = buf;
|
||||
}
|
||||
|
||||
public Zuc256EncryptCtx(Zuc256State state){
|
||||
this.state = state;
|
||||
this.buf = new byte[4];
|
||||
}
|
||||
|
||||
public Zuc256EncryptCtx(){
|
||||
this.state = new Zuc256State();
|
||||
this.buf = new byte[4];
|
||||
}
|
||||
|
||||
// 初始化加密上下文
|
||||
|
||||
Reference in New Issue
Block a user