https://github.com/ron4fun/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), Base64 (various variants).
https://github.com/ron4fun/simplebaselib4cpp
base16 base32 base58 base64 cplusplus cpp encoding
Last synced: 6 months ago
JSON representation
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).
- Host: GitHub
- URL: https://github.com/ron4fun/simplebaselib4cpp
- Owner: ron4fun
- License: mit
- Created: 2018-06-21T05:49:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-10-15T19:34:11.000Z (over 4 years ago)
- Last Synced: 2024-07-23T05:38:37.299Z (over 1 year ago)
- Topics: base16, base32, base58, base64, cplusplus, cpp, encoding
- Language: C++
- Homepage:
- Size: 39.1 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.**
```c++
#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](http://www.boost.org/) installed in your workstation.
**License**
This "Software" is Licensed Under **`MIT License (MIT)`** .
#### Tip Jar
* :dollar: **Bitcoin**: `1Mcci95WffSJnV6PsYG7KD1af1gDfUvLe6`
Conclusion
--------------------------------------------------
Special thanks to [Xor-el](https://github.com/xor-el) for making this library available in the first place.