Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB.NET Base64 Encode/Decode [SRC]
#1
Heres how to encode and decode with Base64 in only two lines of code..

Under "Encode" button
Code:
TextBox1.Text = Convert.ToBase64String(New System.Text.ASCIIEncoding().GetBytes(TextBox1.Text))

Under "Decode" button
Code:
TextBox1.Text = New System.Text.ASCIIEncoding().GetString(Convert.FromBase64String(TextBox1.Text))

Thought this may come in handy for some..
Reply
#2
Wow! I made one from this! This helped me out!! Thanks Smile
Reply
#3
Thanks!

I'm working on an ipod touch app and this will be a part of it!
Reply
#4
very simple but dose the gob. good work
Reply
#5
Thanks for the share Fragama, will come in very handy.
[Image: angelsig.jpg]


Reply
#6
Big thanks for this, this will be useful.
[Image: breaky.png]
Reply
#7
That's very useful. Nice share.
Reply
#8
Thank you, it works fine. Smile
Reply
#9
This is ideal for encoding simple strings that you don't want prying eyes to catch right away. However, always keep in mind that an experienced programmer/someone with malicious intent could easily decode base64, as it's not based around any sort of encryption key.

If you were interested in looking into more advanced forms of encryption, may I suggest AES-256 (Rijndael)?
Reply
#10
I can see this being used in a few applications.
[Image: carbon.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [VB.NET] Animated Form Extend [SRC] Fragma 6 5,537 10-10-2013, 12:18 PM
Last Post: Saket
  [VB.Net][SRC] YouTube Bot HF~Legend 5 3,654 11-25-2012, 05:54 AM
Last Post: Ixam
  [VB.Net][SRC]ProgressBar Color HF~Legend 14 7,494 09-08-2012, 04:18 PM
Last Post: spesificrelax
  [VB.NET] Basic Reverse Connection RAT [SRC] hasam 1 3,044 02-01-2012, 03:10 PM
Last Post: AceInfinity
  VB.NET Computer Information [SRC] Fragma 35 17,061 01-07-2012, 03:56 PM
Last Post: Quantum

Forum Jump:


Users browsing this thread: 6 Guest(s)