Created
July 1, 2020 00:35
-
-
Save alexandramartinez/3637f05c295e3868fcec56866261a59c 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
import java.util.Base64; | |
public class Base64UrlEncoding { | |
public static void main(String []args) { | |
byte[] bytes = "prostdev?blog".getBytes(); | |
String encodedString = new String(Base64.getUrlEncoder().encode(bytes)); | |
System.out.println(encodedString); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment