Base64 Encoding examples

Modified on Fri, 08 Aug 2014 12:40 by Bjørn Otto Vasbotten — Categorized as: Tutorials

Overview

For some products, we require users to use a Base64 encoded string when authenticating with some of our API's.


Table of Contents [Hide/Show]


OSX shell

Open terminal, by using menus (Applications -> Utilities -> Terminal)
$ echo -n "username@logindomain:password" | base64
dXNlcm5hbWVAbG9naW5kb21haW46cGFzc3dvcmQ=


Powershell

$intouchcredentials  = [System.Text.Encoding]::UTF8.GetBytes("username@logindomain:password")
[System.Convert]::ToBase64String($intouchcredentials)
dXNlcm5hbWVAbG9naW5kb21haW46cGFzc3dvcmQ=


Image




Fiddler Text Editor

If you are using the Fiddler2 Web Debugger utility for Windows, you can use the TextWizard from the Tools menu:

Image