changeset 15037:c47ff5fd532f

eliminate old 1.7 signatures for CBC methods
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 08 Apr 2014 20:13:15 -0700
parents 9806a98bcf9a
children 5f6603f00e49
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CipherBlockChainingSubstitutions.java
diffstat 1 files changed, 6 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CipherBlockChainingSubstitutions.java	Tue Apr 08 20:09:36 2014 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CipherBlockChainingSubstitutions.java	Tue Apr 08 20:13:15 2014 -0700
@@ -67,31 +67,8 @@
         return AESCryptSubstitutions.AESCryptClass;
     }
 
-    @MethodSubstitution(isStatic = false, optional = true)
-    static void encrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) {
-        Object embeddedCipher = UnsafeLoadNode.load(rcvr, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION);
-        if (getAESCryptClass().isInstance(embeddedCipher)) {
-            Object aesCipher = PiNode.piCastNonNull(embeddedCipher, AESCryptSubstitutions.AESCryptClass);
-            crypt(rcvr, in, inOffset, inLength, out, outOffset, aesCipher, true);
-        } else {
-            encrypt(rcvr, in, inOffset, inLength, out, outOffset);
-        }
-    }
-
-    @MethodSubstitution(isStatic = false, optional = true)
-    static void decrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) {
-        Object realReceiver = PiNode.piCastNonNull(rcvr, cipherBlockChainingClass);
-        Object embeddedCipher = UnsafeLoadNode.load(realReceiver, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION);
-        if (in != out && getAESCryptClass().isInstance(embeddedCipher)) {
-            Object aesCipher = PiNode.piCastNonNull(embeddedCipher, AESCryptSubstitutions.AESCryptClass);
-            crypt(realReceiver, in, inOffset, inLength, out, outOffset, aesCipher, false);
-        } else {
-            decrypt(realReceiver, in, inOffset, inLength, out, outOffset);
-        }
-    }
-
-    @MethodSubstitution(value = "encrypt", isStatic = false, optional = true)
-    static int encryptInt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) {
+    @MethodSubstitution(isStatic = false)
+    static int encrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) {
         Object realReceiver = PiNode.piCastNonNull(rcvr, cipherBlockChainingClass);
         Object embeddedCipher = UnsafeLoadNode.load(realReceiver, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION);
         if (getAESCryptClass().isInstance(embeddedCipher)) {
@@ -99,12 +76,12 @@
             crypt(realReceiver, in, inOffset, inLength, out, outOffset, aesCipher, true);
             return inLength;
         } else {
-            return encryptInt(realReceiver, in, inOffset, inLength, out, outOffset);
+            return encrypt(realReceiver, in, inOffset, inLength, out, outOffset);
         }
     }
 
-    @MethodSubstitution(value = "decrypt", isStatic = false, optional = true)
-    static int decryptInt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) {
+    @MethodSubstitution(isStatic = false)
+    static int decrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) {
         Object realReceiver = PiNode.piCastNonNull(rcvr, cipherBlockChainingClass);
         Object embeddedCipher = UnsafeLoadNode.load(realReceiver, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION);
         if (in != out && getAESCryptClass().isInstance(embeddedCipher)) {
@@ -112,7 +89,7 @@
             crypt(realReceiver, in, inOffset, inLength, out, outOffset, aesCipher, false);
             return inLength;
         } else {
-            return decryptInt(realReceiver, in, inOffset, inLength, out, outOffset);
+            return decrypt(realReceiver, in, inOffset, inLength, out, outOffset);
         }
     }