From 537a50bee5556816822f70a14f7cf32532bbc160 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 21 Apr 2016 13:28:55 -0400 Subject: [PATCH] Revert "Some Java crypto providers don't allow IvParameterSpec objects for GCM ciphers, so use GCMParameterSpec instead" This reverts commit b37d46fae9b89f5435990c75ce540d64efe374f7. --- .../src/com/limelight/nvstream/input/ControllerStream.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moonlight-common/src/com/limelight/nvstream/input/ControllerStream.java b/moonlight-common/src/com/limelight/nvstream/input/ControllerStream.java index 62af62ca..88a19afa 100644 --- a/moonlight-common/src/com/limelight/nvstream/input/ControllerStream.java +++ b/moonlight-common/src/com/limelight/nvstream/input/ControllerStream.java @@ -19,7 +19,6 @@ import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.ShortBufferException; -import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.IvParameterSpec; import com.limelight.nvstream.ConnectionContext; @@ -403,7 +402,7 @@ public class ControllerStream { Cipher cipher; try { cipher = Cipher.getInstance("AES/GCM/NoPadding"); - cipher.init(Cipher.ENCRYPT_MODE, key, new GCMParameterSpec(128, iv)); + cipher.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(iv)); // This is also non-ideal. Java gives us but we want to send // so we'll take the output and arraycopy it into the right spot in the output buffer