preloader
24 January 2012 / #Powershell

Base64 managing

post-thumb

Here is another memento which was very handy during a vCenter plugin developpement (there’ll be another post during week dealing with it), here is some base64 convert from string :

String > Base64 > String

In order to convert a string to base64, you just have to use the following One-Liner :

[System.Convert]::ToBase64String( [System.Text.Encoding]::UTF8.GetBytes("www.vmdude.fr"))

To convert back the base64 to string, you just have to use the following One-Liner :

[System.Text.Encoding]::UTF8.GetString( [System.Convert]::FromBase64String($string))

memento_base64_01


> Frederic MARTIN