For debugging purposes I needed a quick way to convert Base64 encoded string. My opinion is that the easiest way to achieve is to use Powershell.
Here is the example how to convert string "Hello World" to Base64 using ToBase64String method:
PS C:\Temp>$b = [System.Text.Encoding]::UTF8.GetBytes("Hello World")
PS C:\Temp>[System.Convert]::ToBase64String($b)
SGVsbG8gV29ybGQ=
And here is the example how to decode Base64 string using FromBase64String method:
PS C:\Temp>$b = [System.Convert]::FromBase64String("SGVsbG8gV29ybGQ=")
PS C:\Temp>[System.Text.Encoding]::UTF8.GetString($b)
Hello World
More about using ToBase64String and FromBase64String methods check:
http://msdn.microsoft.com/en-us/library/system.convert.frombase64string.aspx
http://msdn.microsoft.com/en-us/library/system.convert.tobase64string.aspx
Here is the example how to convert string "Hello World" to Base64 using ToBase64String method:
PS C:\Temp>$b = [System.Text.Encoding]::UTF8.GetBytes("Hello World")
PS C:\Temp>[System.Convert]::ToBase64String($b)
SGVsbG8gV29ybGQ=
And here is the example how to decode Base64 string using FromBase64String method:
PS C:\Temp>$b = [System.Convert]::FromBase64String("SGVsbG8gV29ybGQ=")
PS C:\Temp>[System.Text.Encoding]::UTF8.GetString($b)
Hello World
More about using ToBase64String and FromBase64String methods check:
http://msdn.microsoft.com/en-us/library/system.convert.frombase64string.aspx
http://msdn.microsoft.com/en-us/library/system.convert.tobase64string.aspx
This comment has been removed by the author.
ReplyDeleteIf You Experience Something Like ...: How To Convert String To Base64 And Vice Versa Using Powershell >>>>> Download Now
Delete>>>>> Download Full
If You Experience Something Like ...: How To Convert String To Base64 And Vice Versa Using Powershell >>>>> Download LINK
>>>>> Download Now
If You Experience Something Like ...: How To Convert String To Base64 And Vice Versa Using Powershell >>>>> Download Full
>>>>> Download LINK Ls
This comment has been removed by the author.
ReplyDeletethanks for the tutorial. used it for decoding some MDT variables :)
ReplyDeletedo this first to be able to reference [System.Convert]
ReplyDeletePS C:\Temp> add-type -AssemblyName System
do this first to be able to reference [System.Convert]
ReplyDeletePS C:\Temp> add-type -AssemblyName System
cbd oil arizona
ReplyDelete