Hello everyone. I have a problem with StringUtils using base64encode. It works fine on my local PC, but when I run it on my VPS, I get an error.
Here's the error message:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Here is how I convert a string to a base64 string.
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
This is how I decode it.
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			Here's the error message:
			
				B4X:
			
		
		
		(IllegalArgumentException) java.lang.IllegalArgumentException: Base64-encoded string must have at least four characters, but length specified was 3
	Here is how I convert a string to a base64 string.
			
				B4X:
			
		
		
		dim s as string = "some text here"
s = SU.EncodeBase64(s.GetBytes("UTF8"))
	This is how I decode it.
			
				B4X:
			
		
		
		s = BytesToString(SU.DecodeBase64(s), 0, SU.DecodeBase64(s).Length, "UTF8")