public class HotSpotCryptoSubstitutionTest extends HotSpotGraalCompilerTest
GraalCompilerTest.ArgSupplier, GraalCompilerTest.Result
GraalTest.MultiCauseAssertionError
Modifier and Type | Field and Description |
---|---|
(package private) ByteArrayOutputStream |
aesExpected |
(package private) SecretKey |
aesKey |
(package private) AlgorithmParameters |
algorithmParameters |
(package private) ByteArrayOutputStream |
desExpected |
(package private) SecretKey |
desKey |
(package private) byte[] |
input |
lastCompiledGraph
Constructor and Description |
---|
HotSpotCryptoSubstitutionTest() |
Modifier and Type | Method and Description |
---|---|
protected InstalledCode |
addMethod(ResolvedJavaMethod method,
CompilationResult compResult) |
private boolean |
compileAndInstall(String className,
String... methodNames)
Compiles and installs the substitution for some specified methods.
|
private byte[] |
decrypt(byte[] indata,
SecretKey key,
String algorithm) |
private byte[] |
encrypt(byte[] indata,
SecretKey key,
String algorithm) |
private static Method |
lookup(String className,
String methodName) |
private static byte[] |
readClassfile16(Class<? extends HotSpotCryptoSubstitutionTest> c) |
byte[] |
runEncryptDecrypt(SecretKey key,
String algorithm) |
void |
testAESCryptIntrinsics() |
void |
testCipherBlockChainingIntrinsics() |
runtime
after, afterTest, applyArgSuppliers, argsWithReceiver, asResolvedJavaMethod, assertConstantReturn, assertEquals, assertEquals, assertEquals, before, beforeTest, branchProbability, breakpoint, breakpoint, checkArgs, checkHighTierGraph, checkLowTierGraph, checkMidTierGraph, compile, countUnusedConstants, createLIRSuites, createSuites, editGraphBuilderConfiguration, executeActual, executeActualCheckDeopt, executeExpected, getBackend, getCanonicalGraphString, getCode, getCode, getCode, getCodeCache, getConstantReflection, getCustomGraphBuilderSuite, getDefaultGraphBuilderPlugins, getDefaultGraphBuilderSuite, getDefaultHighTierContext, getLIRSuites, getLowerer, getMetaAccess, getNodeCountExcludingUnusedConstants, getProviders, getReplacements, getResolvedJavaMethod, getResolvedJavaMethod, getResolvedJavaMethod, getSnippetReflection, getSpeculationLog, getSuites, getTarget, initializeDebugging, invoke, isArchitecture, iterationCount, lookupMethod, parseDebug, parseEager, parseEager, parseForCompile, parseProfiled, parseProfiled, referenceInvoke, supply, test, test, testAgainstExpected, testAgainstExpected, testN
assertDeepEquals, assertDeepEquals, assertDeepEquals, assertDeepEquals, assertFalse, assertFalse, assertFalse, assertTrue, assertTrue, assertTrue, equalFloatsOrDoublesDelta, fail, getMethod, getMethod, getMethod, ulpsDelta
byte[] input
ByteArrayOutputStream aesExpected
ByteArrayOutputStream desExpected
AlgorithmParameters algorithmParameters
public HotSpotCryptoSubstitutionTest() throws Exception
Exception
protected InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult)
addMethod
in class GraalCompilerTest
public void testAESCryptIntrinsics() throws Exception
Exception
public void testCipherBlockChainingIntrinsics() throws Exception
Exception
private boolean compileAndInstall(String className, String... methodNames)
className
- the name of the class for which substitutions are availablemethodNames
- the names of the substituted methodsprivate byte[] encrypt(byte[] indata, SecretKey key, String algorithm) throws Exception
Exception
private byte[] decrypt(byte[] indata, SecretKey key, String algorithm) throws Exception
Exception
private static byte[] readClassfile16(Class<? extends HotSpotCryptoSubstitutionTest> c) throws IOException
IOException
public byte[] runEncryptDecrypt(SecretKey key, String algorithm) throws Exception
Exception