Discord Server Red Security Twitter Donation to Red Security Red Security Youtube Channel Red Security Tumblr Profile
Windscribe
Login or Register to Hide ads and Accessing all features on the forum
Thread Rating:
  • 7 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Java] Convert String to Base64
#1
Big Grin 
In The Name Of Allah
Al-Salam Alekum

Hey guys, Converting text(String) to Base64 in Java:

Code:
       JTextField text = new JTextField();
       JFrame Converter = new JFrame("String to Base64");
       
       String love = "Red Security";
       String s = Base64.getEncoder().encodeToString(love.getBytes("utf-8"));
       
       Converter.add(text);
       text.setText(s);
       Converter.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       Converter.show();
       Converter.setSize(300, 100);


   

Wa Salam Alekum
Rs
* Thankful to Allah *
Kurdy
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question What is the difference between ‘throw’ and ‘throws’ in Java Exception Handling? Mr.Kurd 0 1,179 03-20-2020, 08:49 PM
Last Post: Mr.Kurd
Question Why Java Strings are immutable in nature? Mr.Kurd 0 284 03-20-2020, 08:47 PM
Last Post: Mr.Kurd
Question What is constructor chaining in Java? Mr.Kurd 0 278 03-20-2020, 08:43 PM
Last Post: Mr.Kurd
Question What is the difference between equals() and == in Java? Mr.Kurd 0 289 03-20-2020, 08:40 PM
Last Post: Mr.Kurd
  What public static void main(String args[]) stand for in Java? Mr.Kurd 0 335 03-20-2020, 08:38 PM
Last Post: Mr.Kurd
Question Why multiple inheritance is not supported in java? Mr.Kurd 0 316 03-20-2020, 08:34 PM
Last Post: Mr.Kurd
  Tutorial Taking Screenshot in Java Mr.Kurd 0 361 03-09-2020, 05:38 PM
Last Post: Mr.Kurd
  10 java skills HeavensReject 1 506 01-12-2020, 05:31 AM
Last Post: Mr.Kurd
Wink Tutorial Downloading video from Youtube using JAVA Mr.Kurd 0 1,150 02-06-2019, 06:33 PM
Last Post: Mr.Kurd
  Tutorial Java and SSH Mr.Kurd 0 1,011 12-16-2018, 08:05 PM
Last Post: Mr.Kurd



Users browsing this thread: 1 Guest(s)