Base64 managing

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))

One comment

  1. Pingback: Плагин sshAutoConnect для vCenter — быстрое соединение с хостами по SSH. — ITG.BY

Leave a Reply

Required fields are marked *.