Issue
How to convert base64 to string in spring-boot(java). My private key in base64 format i want to convert it to string format. I don't know how to do this please help me to solve this problem.
Solution
You need to understand encoding/decoding if you want to customize it but simply you can use Base64 class of Java to decode from Base64 to String. Given an example -
byte[] decode = Base64.getDecoder().decode("Your String");
String decodedString = new String(decode);
You can check java.util.Base64 class to find out more interesting thing.
Reference - https://www.baeldung.com/java-base64-encode-and-decode
Answered By - tanviranindo
Answer Checked By - Willingham (JavaFixing Volunteer)