public class org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest extends org.graalvm.compiler.hotspot.test.HotSpotGraalCompilerTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest
super_class: org.graalvm.compiler.hotspot.test.HotSpotGraalCompilerTest
{
javax.crypto.SecretKey aesKey;
descriptor: Ljavax/crypto/SecretKey;
flags: (0x0000)
javax.crypto.SecretKey desKey;
descriptor: Ljavax/crypto/SecretKey;
flags: (0x0000)
byte[] input;
descriptor: [B
flags: (0x0000)
java.io.ByteArrayOutputStream aesExpected;
descriptor: Ljava/io/ByteArrayOutputStream;
flags: (0x0000)
java.io.ByteArrayOutputStream desExpected;
descriptor: Ljava/io/ByteArrayOutputStream;
flags: (0x0000)
java.security.AlgorithmParameters algorithmParameters;
descriptor: Ljava/security/AlgorithmParameters;
flags: (0x0000)
protected jdk.vm.ci.code.InstalledCode addMethod(org.graalvm.compiler.debug.DebugContext, jdk.vm.ci.meta.ResolvedJavaMethod, org.graalvm.compiler.code.CompilationResult);
descriptor: (Lorg/graalvm/compiler/debug/DebugContext;Ljdk/vm/ci/meta/ResolvedJavaMethod;Lorg/graalvm/compiler/code/CompilationResult;)Ljdk/vm/ci/code/InstalledCode;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.getBackend:()Lorg/graalvm/compiler/core/target/Backend;
aload 1
aload 2
aload 3
invokevirtual org.graalvm.compiler.core.target.Backend.createDefaultInstalledCode:(Lorg/graalvm/compiler/debug/DebugContext;Ljdk/vm/ci/meta/ResolvedJavaMethod;Lorg/graalvm/compiler/code/CompilationResult;)Ljdk/vm/ci/code/InstalledCode;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
0 1 1 debug Lorg/graalvm/compiler/debug/DebugContext;
0 1 2 method Ljdk/vm/ci/meta/ResolvedJavaMethod;
0 1 3 compResult Lorg/graalvm/compiler/code/CompilationResult;
MethodParameters:
Name Flags
debug
method
compResult
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
invokespecial org.graalvm.compiler.hotspot.test.HotSpotGraalCompilerTest.<init>:()V
1: aload 0
new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
putfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.aesExpected:Ljava/io/ByteArrayOutputStream;
2: aload 0
new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
putfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.desExpected:Ljava/io/ByteArrayOutputStream;
3: iconst_4
newarray 8
dup
iconst_0
iconst_4
bastore
dup
iconst_1
bipush 7
bastore
dup
iconst_2
iconst_1
bastore
dup
iconst_3
iconst_1
bastore
astore 1
start local 1 4: new java.security.SecureRandom
dup
aload 1
invokespecial java.security.SecureRandom.<init>:([B)V
astore 2
start local 2 5: ldc "AES"
invokestatic javax.crypto.KeyGenerator.getInstance:(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;
astore 3
start local 3 6: ldc "DESede"
invokestatic javax.crypto.KeyGenerator.getInstance:(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;
astore 4
start local 4 7: aload 3
sipush 128
aload 2
invokevirtual javax.crypto.KeyGenerator.init:(ILjava/security/SecureRandom;)V
8: aload 4
sipush 168
aload 2
invokevirtual javax.crypto.KeyGenerator.init:(ILjava/security/SecureRandom;)V
9: aload 0
aload 3
invokevirtual javax.crypto.KeyGenerator.generateKey:()Ljavax/crypto/SecretKey;
putfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.aesKey:Ljavax/crypto/SecretKey;
10: aload 0
aload 4
invokevirtual javax.crypto.KeyGenerator.generateKey:()Ljavax/crypto/SecretKey;
putfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.desKey:Ljavax/crypto/SecretKey;
11: aload 0
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokestatic org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.readClassfile16:(Ljava/lang/Class;)[B
putfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.input:[B
12: aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.aesExpected:Ljava/io/ByteArrayOutputStream;
aload 0
aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.aesKey:Ljavax/crypto/SecretKey;
ldc "AES/CBC/NoPadding"
invokevirtual org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.runEncryptDecrypt:(Ljavax/crypto/SecretKey;Ljava/lang/String;)[B
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
13: aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.aesExpected:Ljava/io/ByteArrayOutputStream;
aload 0
aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.aesKey:Ljavax/crypto/SecretKey;
ldc "AES/CBC/PKCS5Padding"
invokevirtual org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.runEncryptDecrypt:(Ljavax/crypto/SecretKey;Ljava/lang/String;)[B
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
14: aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.desExpected:Ljava/io/ByteArrayOutputStream;
aload 0
aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.desKey:Ljavax/crypto/SecretKey;
ldc "DESede/CBC/NoPadding"
invokevirtual org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.runEncryptDecrypt:(Ljavax/crypto/SecretKey;Ljava/lang/String;)[B
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
15: aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.desExpected:Ljava/io/ByteArrayOutputStream;
aload 0
aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.desKey:Ljavax/crypto/SecretKey;
ldc "DESede/CBC/PKCS5Padding"
invokevirtual org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.runEncryptDecrypt:(Ljavax/crypto/SecretKey;Ljava/lang/String;)[B
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
16: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
4 17 1 seed [B
5 17 2 random Ljava/security/SecureRandom;
6 17 3 aesKeyGen Ljavax/crypto/KeyGenerator;
7 17 4 desKeyGen Ljavax/crypto/KeyGenerator;
Exceptions:
throws java.lang.Exception
public void testAESCryptIntrinsics();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problems: \n\tTest cannot be resolved to a type\n\tAssert cannot be resolved\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
Exceptions:
throws java.lang.Exception
RuntimeInvisibleAnnotations:
Test()
public void testCipherBlockChainingIntrinsics();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problems: \n\tTest cannot be resolved to a type\n\tAssert cannot be resolved\n\tAssert cannot be resolved\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
Exceptions:
throws java.lang.Exception
RuntimeInvisibleAnnotations:
Test()
private boolean compileAndInstall(java.lang.String, java.lang.String[]);
descriptor: (Ljava/lang/String;[Ljava/lang/String;)Z
flags: (0x0082) ACC_PRIVATE, ACC_VARARGS
Code:
stack=3, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.runtime:()Lorg/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider;
invokeinterface org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider.getVMConfig:()Lorg/graalvm/compiler/hotspot/GraalHotSpotVMConfig;
getfield org.graalvm.compiler.hotspot.GraalHotSpotVMConfig.useAESIntrinsics:Z
ifne 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 1
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
astore 3
start local 3 3: goto 6
end local 3 StackMap locals:
StackMap stack: java.lang.ClassNotFoundException
4: pop
5: iconst_0
ireturn
start local 3 6: StackMap locals: java.lang.Class
StackMap stack:
iconst_0
istore 4
start local 4 7: aload 2
dup
astore 8
arraylength
istore 7
iconst_0
istore 6
goto 12
StackMap locals: org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest java.lang.String java.lang.String[] java.lang.Class int top int int java.lang.String[]
StackMap stack:
8: aload 8
iload 6
aaload
astore 5
start local 5 9: aload 0
aload 3
aload 5
invokevirtual org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.compileAndInstallSubstitution:(Ljava/lang/Class;Ljava/lang/String;)Ljdk/vm/ci/code/InstalledCode;
ifnull 11
10: iconst_1
istore 4
end local 5 11: StackMap locals:
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
12: iload 6
iload 7
if_icmplt 8
13: iload 4
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
0 14 1 className Ljava/lang/String;
0 14 2 methodNames [Ljava/lang/String;
3 4 3 c Ljava/lang/Class<*>;
6 14 3 c Ljava/lang/Class<*>;
7 14 4 atLeastOneCompiled Z
9 11 5 methodName Ljava/lang/String;
Exception table:
from to target type
2 3 4 Class java.lang.ClassNotFoundException
MethodParameters:
Name Flags
className
methodNames
private byte[] encrypt(byte[], javax.crypto.SecretKey, java.lang.String);
descriptor: ([BLjavax/crypto/SecretKey;Ljava/lang/String;)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=8, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
astore 4
start local 4 1: aload 3
invokestatic javax.crypto.Cipher.getInstance:(Ljava/lang/String;)Ljavax/crypto/Cipher;
astore 5
start local 5 2: aload 5
iconst_1
aload 2
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;)V
3: aload 0
aload 5
invokevirtual javax.crypto.Cipher.getParameters:()Ljava/security/AlgorithmParameters;
putfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.algorithmParameters:Ljava/security/AlgorithmParameters;
4: aload 5
aload 4
invokevirtual javax.crypto.Cipher.update:([B)[B
astore 6
start local 6 5: aload 5
invokevirtual javax.crypto.Cipher.doFinal:()[B
astore 7
start local 7 6: aload 6
arraylength
aload 7
arraylength
iadd
newarray 8
astore 4
7: aload 6
iconst_0
aload 4
iconst_0
aload 6
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: aload 7
iconst_0
aload 4
aload 6
arraylength
aload 7
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
9: aload 4
areturn
end local 7 end local 6 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 10 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
0 10 1 indata [B
0 10 2 key Ljavax/crypto/SecretKey;
0 10 3 algorithm Ljava/lang/String;
1 10 4 result [B
2 10 5 c Ljavax/crypto/Cipher;
5 10 6 r1 [B
6 10 7 r2 [B
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
indata
key
algorithm
private byte[] decrypt(byte[], javax.crypto.SecretKey, java.lang.String);
descriptor: ([BLjavax/crypto/SecretKey;Ljava/lang/String;)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=8, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
astore 4
start local 4 1: aload 3
invokestatic javax.crypto.Cipher.getInstance:(Ljava/lang/String;)Ljavax/crypto/Cipher;
astore 5
start local 5 2: aload 5
iconst_2
aload 2
aload 0
getfield org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest.algorithmParameters:Ljava/security/AlgorithmParameters;
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/AlgorithmParameters;)V
3: aload 5
aload 4
invokevirtual javax.crypto.Cipher.update:([B)[B
astore 6
start local 6 4: aload 5
invokevirtual javax.crypto.Cipher.doFinal:()[B
astore 7
start local 7 5: aload 6
arraylength
aload 7
arraylength
iadd
newarray 8
astore 4
6: aload 6
iconst_0
aload 4
iconst_0
aload 6
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
7: aload 7
iconst_0
aload 4
aload 6
arraylength
aload 7
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: aload 4
areturn
end local 7 end local 6 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 9 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
0 9 1 indata [B
0 9 2 key Ljavax/crypto/SecretKey;
0 9 3 algorithm Ljava/lang/String;
1 9 4 result [B
2 9 5 c Ljavax/crypto/Cipher;
4 9 6 r1 [B
5 9 7 r2 [B
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
indata
key
algorithm
private static byte[] readClassfile16(java.lang.Class<? extends org.graalvm.compiler.hotspot.test.HotSpotCryptoSubstitutionTest>);
descriptor: (Ljava/lang/Class;)[B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
ldc "/"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
bipush 46
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ".class"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 1: aload 0
aload 1
invokevirtual java.lang.Class.getResourceAsStream:(Ljava/lang/String;)Ljava/io/InputStream;
astore 2
start local 2 2: aload 2
invokevirtual java.io.InputStream.available:()I
istore 3
start local 3 3: iload 3
iload 3
bipush 16
irem
isub
istore 3
4: iload 3
newarray 8
astore 4
start local 4 5: new java.io.DataInputStream
dup
aload 2
invokespecial java.io.DataInputStream.<init>:(Ljava/io/InputStream;)V
aload 4
invokevirtual java.io.DataInputStream.readFully:([B)V
6: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 c Ljava/lang/Class<+Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;>;
1 7 1 classFilePath Ljava/lang/String;
2 7 2 stream Ljava/io/InputStream;
3 7 3 bytesToRead I
5 7 4 classFile [B
Exceptions:
throws java.io.IOException
Signature: (Ljava/lang/Class<+Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;>;)[B
MethodParameters:
Name Flags
c
public byte[] runEncryptDecrypt(javax.crypto.SecretKey, java.lang.String);
descriptor: (Ljavax/crypto/SecretKey;Ljava/lang/String;)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tAssert cannot be resolved\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
key
algorithm
}
SourceFile: "HotSpotCryptoSubstitutionTest.java"