移植中
This commit is contained in:
@@ -1,15 +1,31 @@
|
||||
package com.cscn;
|
||||
|
||||
/**
|
||||
* MAC上下文类
|
||||
* MAC上下文类(JavaCard版,int 拆分为两个 short)
|
||||
*/
|
||||
public final class Zuc256MacCtx {
|
||||
int[] LFSR = new int[16];
|
||||
int R1;
|
||||
int R2;
|
||||
// LFSR: 原本 int[16],拆成 hi/lo 各 16 short
|
||||
short[] LFSR_hi = new short[16];
|
||||
short[] LFSR_lo = new short[16];
|
||||
|
||||
// R1、R2: 原本 int,拆成 hi/lo
|
||||
short R1_hi;
|
||||
short R1_lo;
|
||||
short R2_hi;
|
||||
short R2_lo;
|
||||
|
||||
// 缓冲区
|
||||
byte[] buf = new byte[4];
|
||||
int buflen;
|
||||
int[] T = new int[4];
|
||||
int[] K0 = new int[4];
|
||||
int macbits;
|
||||
short buflen;
|
||||
|
||||
// T: 原本 int[4],拆成 hi/lo
|
||||
short[] T_hi = new short[4];
|
||||
short[] T_lo = new short[4];
|
||||
|
||||
// K0: 原本 int[4],拆成 hi/lo
|
||||
short[] K0_hi = new short[4];
|
||||
short[] K0_lo = new short[4];
|
||||
|
||||
// macbits: 原本 int,改成 short 足够
|
||||
short macbits;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user