Skip to content

SimpleBaseLib4CPP is a simple C++11 Base Encoding library that provides at the moment support for encoding and decoding various bases such as Base16, Base32 (various variants), Base58 (various variants), Base64 (various variants).

License

Notifications You must be signed in to change notification settings

ZiglerLong/SimpleBaseLib4CPP

 
 

Repository files navigation

SimpleBaseLib4CPP

SimpleBaseLib4CPP is a simple C++11 Base Encoding library that provides at the moment support for encoding and decoding various bases such as Base16, Base32 (various variants), Base58 (various variants) and Base64 (various variants).

Supported Encodings:

Base64: Default, DefaultNoPadding, UrlEncoding, XmlEncoding, RegExEncoding and FileEncoding alphabets 
(and any custom alphabet you might have)

Base58: Bitcoin, Ripple and Flickr alphabets (and any custom alphabet you might have)

Base32: RFC 4648, Crockford and Extended Hex (BASE32-HEX) alphabets with Crockford character substitution 
(or any other custom alphabets you might want to use)   

Base16: An experimental hexadecimal encoder/decoder.

Tested Enviroments:

Visual Studio 2015.

Usage Examples.

#include "stdafx.h"
#include "Base/SimpleBaseFactory.h"
#include "Utils/Utilities.h"

int main()
{
    IBase32 base32 = SimpleBaseFactory::CreateBase32Crockford();
    string rawData = "foobar";
	string result;

    SimpleBaseLibByteArray bytes = Utilities::convertASCIIStringToByteArray(rawData);

	result = base32->Encode(bytes);
	        
    return 0;
}

Unit Tests:

To run the unit tests, you should have boost library installed in your workstation.

License

This "Software" is Licensed Under MIT License (MIT) .

Tip Jar

  • 💵 Bitcoin: 1Mcci95WffSJnV6PsYG7KD1af1gDfUvLe6

Conclusion

Special thanks to Xor-el for making this library avialable in the first place.

About

SimpleBaseLib4CPP is a simple C++11 Base Encoding library that provides at the moment support for encoding and decoding various bases such as Base16, Base32 (various variants), Base58 (various variants), Base64 (various variants).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 76.1%
  • C 23.9%