How can I authenticate to use the API?

I am trying to pull all blog posts, and I found this documentation:  List Blog Post REST Endpoint 
I was able to generate an API key, however I cannot figure out how to generate an encoded token, "ENCODED_TOKEN in the example is the base64-encoded concatenation of the user's API key (created from the user's profile), a colon (:), and the user's user name."