I am getting java.lang.IllegalArgumentException: Null input buffer exception while i am calling decode input string function. here is my function
public String decodeInputString(String inputString) throws NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, NoSuchPaddingException {
byte[] salt = "MyKey".getBytes();
SecretKey secretKey = new SecretKeySpec(salt, 0, 16, "AES");
byte[] encryptedTextByte = Base64.decode(inputString);
cipher = Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE, secretKey);
byte[] decryptedByte = cipher.doFinal(encryptedTextByte);
String decryptedText = new String(decryptedByte);
return decryptedText;
}
while i am calling decodeInputString("s8aCvIy4pcgc Y Gu/MSAw==") i am getting java.lang.IllegalArgumentException: Null input buffer exception.