public class org.bouncycastle.crypto.macs.CMac implements org.bouncycastle.crypto.Mac
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.crypto.macs.CMac
super_class: java.lang.Object
{
private static final byte CONSTANT_128;
descriptor: B
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: -121
private static final byte CONSTANT_64;
descriptor: B
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 27
private byte[] ZEROES;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private byte[] mac;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private byte[] buf;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int bufOff;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private org.bouncycastle.crypto.BlockCipher cipher;
descriptor: Lorg/bouncycastle/crypto/BlockCipher;
flags: (0x0002) ACC_PRIVATE
private int macSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private byte[] L;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private byte[] Lu;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private byte[] Lu2;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
public void <init>(org.bouncycastle.crypto.BlockCipher);
descriptor: (Lorg/bouncycastle/crypto/BlockCipher;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
bipush 8
imul
invokespecial org.bouncycastle.crypto.macs.CMac.<init>:(Lorg/bouncycastle/crypto/BlockCipher;I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bouncycastle/crypto/macs/CMac;
0 2 1 cipher Lorg/bouncycastle/crypto/BlockCipher;
MethodParameters:
Name Flags
cipher
public void <init>(org.bouncycastle.crypto.BlockCipher, int);
descriptor: (Lorg/bouncycastle/crypto/BlockCipher;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: iload 2
bipush 8
irem
ifeq 3
2: new java.lang.IllegalArgumentException
dup
ldc "MAC size must be multiple of 8"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: org.bouncycastle.crypto.macs.CMac org.bouncycastle.crypto.BlockCipher int
StackMap stack:
iload 2
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
bipush 8
imul
if_icmple 9
4: new java.lang.IllegalArgumentException
dup
5: new java.lang.StringBuilder
dup
ldc "MAC size must be less or equal to "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
6: aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
bipush 8
imul
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
7: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
8: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
bipush 8
if_icmpeq 13
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
bipush 16
if_icmpeq 13
10: new java.lang.IllegalArgumentException
dup
11: ldc "Block size must be either 64 or 128 bits"
12: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
13: StackMap locals:
StackMap stack:
aload 0
new org.bouncycastle.crypto.modes.CBCBlockCipher
dup
aload 1
invokespecial org.bouncycastle.crypto.modes.CBCBlockCipher.<init>:(Lorg/bouncycastle/crypto/BlockCipher;)V
putfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
14: aload 0
iload 2
bipush 8
idiv
putfield org.bouncycastle.crypto.macs.CMac.macSize:I
15: aload 0
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
newarray 8
putfield org.bouncycastle.crypto.macs.CMac.mac:[B
16: aload 0
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
newarray 8
putfield org.bouncycastle.crypto.macs.CMac.buf:[B
17: aload 0
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
newarray 8
putfield org.bouncycastle.crypto.macs.CMac.ZEROES:[B
18: aload 0
iconst_0
putfield org.bouncycastle.crypto.macs.CMac.bufOff:I
19: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lorg/bouncycastle/crypto/macs/CMac;
0 20 1 cipher Lorg/bouncycastle/crypto/BlockCipher;
0 20 2 macSizeInBits I
MethodParameters:
Name Flags
cipher
macSizeInBits
public java.lang.String getAlgorithmName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
invokeinterface org.bouncycastle.crypto.BlockCipher.getAlgorithmName:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/crypto/macs/CMac;
private byte[] doubleLu(byte[]);
descriptor: ([B)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=2
start local 0 start local 1 0: aload 1
iconst_0
baload
sipush 255
iand
bipush 7
ishr
istore 2
start local 2 1: aload 1
arraylength
newarray 8
astore 3
start local 3 2: iconst_0
istore 4
start local 4 3: goto 6
4: StackMap locals: int byte[] int
StackMap stack:
aload 3
iload 4
aload 1
iload 4
baload
iconst_1
ishl
aload 1
iload 4
iconst_1
iadd
baload
sipush 255
iand
bipush 7
ishr
iadd
i2b
bastore
5: iinc 4 1
StackMap locals:
StackMap stack:
6: iload 4
aload 1
arraylength
iconst_1
isub
if_icmplt 4
end local 4 7: aload 3
aload 1
arraylength
iconst_1
isub
aload 1
aload 1
arraylength
iconst_1
isub
baload
iconst_1
ishl
i2b
bastore
8: iload 2
iconst_1
if_icmpne 12
9: aload 3
aload 1
arraylength
iconst_1
isub
dup2
baload
aload 1
arraylength
bipush 16
if_icmpne 10
bipush -121
goto 11
StackMap locals: org.bouncycastle.crypto.macs.CMac byte[] int byte[]
StackMap stack: byte[] int int
10: bipush 27
StackMap locals: org.bouncycastle.crypto.macs.CMac byte[] int byte[]
StackMap stack: byte[] int int int
11: ixor
i2b
bastore
12: StackMap locals:
StackMap stack:
aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/bouncycastle/crypto/macs/CMac;
0 13 1 in [B
1 13 2 FirstBit I
2 13 3 ret [B
3 7 4 i I
MethodParameters:
Name Flags
in
public void init(org.bouncycastle.crypto.CipherParameters);
descriptor: (Lorg/bouncycastle/crypto/CipherParameters;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.bouncycastle.crypto.macs.CMac.reset:()V
1: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
iconst_1
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.init:(ZLorg/bouncycastle/crypto/CipherParameters;)V
2: aload 0
aload 0
getfield org.bouncycastle.crypto.macs.CMac.ZEROES:[B
arraylength
newarray 8
putfield org.bouncycastle.crypto.macs.CMac.L:[B
3: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
aload 0
getfield org.bouncycastle.crypto.macs.CMac.ZEROES:[B
iconst_0
aload 0
getfield org.bouncycastle.crypto.macs.CMac.L:[B
iconst_0
invokeinterface org.bouncycastle.crypto.BlockCipher.processBlock:([BI[BI)I
pop
4: aload 0
aload 0
aload 0
getfield org.bouncycastle.crypto.macs.CMac.L:[B
invokevirtual org.bouncycastle.crypto.macs.CMac.doubleLu:([B)[B
putfield org.bouncycastle.crypto.macs.CMac.Lu:[B
5: aload 0
aload 0
aload 0
getfield org.bouncycastle.crypto.macs.CMac.Lu:[B
invokevirtual org.bouncycastle.crypto.macs.CMac.doubleLu:([B)[B
putfield org.bouncycastle.crypto.macs.CMac.Lu2:[B
6: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
iconst_1
aload 1
invokeinterface org.bouncycastle.crypto.BlockCipher.init:(ZLorg/bouncycastle/crypto/CipherParameters;)V
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/bouncycastle/crypto/macs/CMac;
0 8 1 params Lorg/bouncycastle/crypto/CipherParameters;
MethodParameters:
Name Flags
params
public int getMacSize();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.macs.CMac.macSize:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/crypto/macs/CMac;
public void update(byte);
descriptor: (B)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
arraylength
if_icmpne 3
1: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
iconst_0
aload 0
getfield org.bouncycastle.crypto.macs.CMac.mac:[B
iconst_0
invokeinterface org.bouncycastle.crypto.BlockCipher.processBlock:([BI[BI)I
pop
2: aload 0
iconst_0
putfield org.bouncycastle.crypto.macs.CMac.bufOff:I
3: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
aload 0
dup
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
dup_x1
iconst_1
iadd
putfield org.bouncycastle.crypto.macs.CMac.bufOff:I
iload 1
bastore
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bouncycastle/crypto/macs/CMac;
0 5 1 in B
MethodParameters:
Name Flags
in
public void update(byte[], int, int);
descriptor: ([BII)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 3
ifge 4
1: new java.lang.IllegalArgumentException
dup
2: ldc "Can't have a negative input length!"
3: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
istore 4
start local 4 5: iload 4
aload 0
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
isub
istore 5
start local 5 6: iload 3
iload 5
if_icmple 17
7: aload 1
iload 2
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
aload 0
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
iload 5
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
iconst_0
aload 0
getfield org.bouncycastle.crypto.macs.CMac.mac:[B
iconst_0
invokeinterface org.bouncycastle.crypto.BlockCipher.processBlock:([BI[BI)I
pop
9: aload 0
iconst_0
putfield org.bouncycastle.crypto.macs.CMac.bufOff:I
10: iload 3
iload 5
isub
istore 3
11: iload 2
iload 5
iadd
istore 2
12: goto 16
13: StackMap locals: int int
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
aload 1
iload 2
aload 0
getfield org.bouncycastle.crypto.macs.CMac.mac:[B
iconst_0
invokeinterface org.bouncycastle.crypto.BlockCipher.processBlock:([BI[BI)I
pop
14: iload 3
iload 4
isub
istore 3
15: iload 2
iload 4
iadd
istore 2
16: StackMap locals:
StackMap stack:
iload 3
iload 4
if_icmpgt 13
17: StackMap locals:
StackMap stack:
aload 1
iload 2
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
aload 0
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
iload 3
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
18: aload 0
dup
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
iload 3
iadd
putfield org.bouncycastle.crypto.macs.CMac.bufOff:I
19: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lorg/bouncycastle/crypto/macs/CMac;
0 20 1 in [B
0 20 2 inOff I
0 20 3 len I
5 20 4 blockSize I
6 20 5 gapLen I
MethodParameters:
Name Flags
in
inOff
len
public int doFinal(byte[], int);
descriptor: ([BI)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
invokeinterface org.bouncycastle.crypto.BlockCipher.getBlockSize:()I
istore 3
start local 3 1: aload 0
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
iload 3
if_icmpne 4
2: aload 0
getfield org.bouncycastle.crypto.macs.CMac.Lu:[B
astore 4
start local 4 3: goto 6
end local 4 4: StackMap locals: int
StackMap stack:
new org.bouncycastle.crypto.paddings.ISO7816d4Padding
dup
invokespecial org.bouncycastle.crypto.paddings.ISO7816d4Padding.<init>:()V
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
aload 0
getfield org.bouncycastle.crypto.macs.CMac.bufOff:I
invokevirtual org.bouncycastle.crypto.paddings.ISO7816d4Padding.addPadding:([BI)I
pop
5: aload 0
getfield org.bouncycastle.crypto.macs.CMac.Lu2:[B
astore 4
start local 4 6: StackMap locals: byte[]
StackMap stack:
iconst_0
istore 5
start local 5 7: goto 10
8: StackMap locals: int
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
iload 5
dup2
baload
aload 4
iload 5
baload
ixor
i2b
bastore
9: iinc 5 1
StackMap locals:
StackMap stack:
10: iload 5
aload 0
getfield org.bouncycastle.crypto.macs.CMac.mac:[B
arraylength
if_icmplt 8
end local 5 11: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
iconst_0
aload 0
getfield org.bouncycastle.crypto.macs.CMac.mac:[B
iconst_0
invokeinterface org.bouncycastle.crypto.BlockCipher.processBlock:([BI[BI)I
pop
12: aload 0
getfield org.bouncycastle.crypto.macs.CMac.mac:[B
iconst_0
aload 1
iload 2
aload 0
getfield org.bouncycastle.crypto.macs.CMac.macSize:I
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
13: aload 0
invokevirtual org.bouncycastle.crypto.macs.CMac.reset:()V
14: aload 0
getfield org.bouncycastle.crypto.macs.CMac.macSize:I
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/bouncycastle/crypto/macs/CMac;
0 15 1 out [B
0 15 2 outOff I
1 15 3 blockSize I
3 4 4 lu [B
6 15 4 lu [B
7 11 5 i I
MethodParameters:
Name Flags
out
outOff
public void reset();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: iconst_0
istore 1
start local 1 1: goto 4
2: StackMap locals: int
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
iload 1
iconst_0
bastore
3: iinc 1 1
StackMap locals:
StackMap stack:
4: iload 1
aload 0
getfield org.bouncycastle.crypto.macs.CMac.buf:[B
arraylength
if_icmplt 2
end local 1 5: aload 0
iconst_0
putfield org.bouncycastle.crypto.macs.CMac.bufOff:I
6: aload 0
getfield org.bouncycastle.crypto.macs.CMac.cipher:Lorg/bouncycastle/crypto/BlockCipher;
invokeinterface org.bouncycastle.crypto.BlockCipher.reset:()V
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/bouncycastle/crypto/macs/CMac;
1 5 1 i I
}
SourceFile: "CMac.java"