Created
February 29, 2016 10:22
Revisions
-
Jaymo created this gist
Feb 29, 2016 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ public static Cipher createCipher(int mode,SecretKey key,String iv) throws Exception { Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding", "BC"); cipher.init( Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"), new IvParameterSpec(Util.HexEncoder.toByte(iv)) ); }