public class HotSpotCryptoSubstitutionTest extends HotSpotGraalCompilerTest
GraalCompilerTest.ArgSupplier, GraalCompilerTest.ResultGraalTest.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() |
runtimeafter, 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, testNassertDeepEquals, assertDeepEquals, assertDeepEquals, assertDeepEquals, assertFalse, assertFalse, assertFalse, assertTrue, assertTrue, assertTrue, equalFloatsOrDoublesDelta, fail, getMethod, getMethod, getMethod, ulpsDeltabyte[] input
ByteArrayOutputStream aesExpected
ByteArrayOutputStream desExpected
AlgorithmParameters algorithmParameters
public HotSpotCryptoSubstitutionTest() throws Exception
Exceptionprotected InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult)
addMethod in class GraalCompilerTestpublic void testAESCryptIntrinsics() throws Exception
Exceptionpublic void testCipherBlockChainingIntrinsics() throws Exception
Exceptionprivate 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
Exceptionprivate byte[] decrypt(byte[] indata, SecretKey key, String algorithm) throws Exception
Exceptionprivate static byte[] readClassfile16(Class<? extends HotSpotCryptoSubstitutionTest> c) throws IOException
IOExceptionpublic byte[] runEncryptDecrypt(SecretKey key, String algorithm) throws Exception
Exception