package io.domisum.lib.auxiliumlib.datacontainers;

import io.domisum.lib.auxiliumlib.annotations.API;
import io.domisum.lib.auxiliumlib.util.math.RandomUtil;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@API
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class UrlBase64
{
	
	// CONSTANTS
	@API
	public static final String CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-";
	
	
	// GENERATION
	@API
	public static String generate(int length)
	{
		var key = new StringBuilder();
		for(int i = 0; i < length; i++)
			key.append(getRandomCharacter());
		
		return key.toString();
	}
	
	private static char getRandomCharacter()
	{
		return CHARACTERS.charAt(RandomUtil.nextInt(CHARACTERS.length()));
	}
	
}

@@ -213,16 +213,42 @@
 uctor;%0A%0A
+import java.util.Base64;%0A%0A
 @API%0A@No
@@ -782,10 +782,194 @@
 );%0A%09%7D%0A%09%0A
+%09%0A%09// CODING%0A%09@API%0A%09public static byte%5B%5D decode(String urlBase64)%0A%09%7B%0A%09%09String base64 = urlBase64.replace('-', '+').replace('_', '/');%0A%09%09return Base64.getDecoder().decode(base64);%0A%09%7D%0A%09%0A
 %7D%0A

Add UrlBase64#decode