Created
October 31, 2018 15:04
-
-
Save jetrubyshared/2918fe3556600af7e326776844873a2c to your computer and use it in GitHub Desktop.
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 characters
private static String decryptString(String string, Cipher cipher) { | |
try { | |
byte[] bytes = Base64.decode(string, Base64.NO_WRAP); | |
return new String(cipher.doFinal(bytes)); | |
} catch (IllegalBlockSizeException | BadPaddingException exception) { | |
exception.printStackTrace(); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment