Code example for IllegalBlockSizeException

Methods: printStackTrace

0
		try { 
			byte[] dec = Base64Coder.decode(str);
 
			utf8 = dcipher.doFinal(dec);
		} catch (IllegalBlockSizeException e) {
			e.printStackTrace();
		} catch (BadPaddingException e) {
			e.printStackTrace();
		} 
		return utf8;
	} 
 
	/** 
	 * 使用base64处理string并解密,使用utf-8的string输出,失败返回null 
	 * @param str 
	 * @return 
	 */ 
	public static final String decrypt(String str) {
		// Decode using utf-8 
		String de = null;
Experience pair programming with AI  Get Codota for Java