Skip to content

acantu27/Base64Lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base64Lib

Build License Version

A simple Base64 1 library to encode and decode text.

Usage

This is a header only library so copying to your project would be easiest. Text can be encoded or decoded by passing it to an object of Base64. It accepts a string and returns a string. padding 2 and leastSignificantBit 3 are calculated in a separate function.

Base64::Base64 obj;
obj.encode64("testEncode");            // Output: dGVzdEVuY29kZQ==
obj.decode64("aG93c0l0R29pbmc=");      // Output: howsItGoing

References

  1. Base64 Wikipedia
  2. Base64 Padding
  3. Least Significant Bit