Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old February 6th, 2004, 11:08 AM
Rich's Avatar
Rich Rich is offline
Administrator
Developer Shed Admin.
 
Join Date: Sep 2003
Location: Fort Lauderdale, FL
Posts: 151 Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 37 sec
Reputation Power: 10
Convert String to ToBase64ToString method

Was recently trying to find a method to encode a string using ToBase64ToString method in the System.Convert class. The .NET framework makes life so easy when doing such complicated things for newbies like me!

Dim strSomething As String = "SomeCoolString"
Dim myByteArray As Byte()
Dim a As New System.Text.ASCIIEncoding()

myByteArray= a.GetBytes(strSomething )

Dim myZZTop As String
myZZTop = System.Convert.ToBase64String(myByteArray, 0, myByteArray.Length) ...Was recently trying to find a method to encode a string using ToBase64ToString method in the System.Convert class. The .NET framework makes life so easy when doing such complicated things for newbies like me!
[code]
Dim strSomething As String = "SomeCoolString"
Dim myByteArray As Byte()
Dim a As New System.Text.ASCIIEncoding()

myByteArray= a.GetBytes(strSomething )

Dim myZZTop As String
myZZTop = System.Convert.ToBase64String(myByteArray, 0, myByteArray.Length)



[bold]Want to decrypt it! Here is the code[/bold]

Imports System.Text
Function DecryptZZString(myZZTop as string) as String

Dim objUTF8 As New UTF8Encoding()
DecryptZZString= objUTF8.GetString(Convert.FromBase64String(myZZTop ))
End Function

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Convert String to ToBase64ToString method


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway