Copyright (c) 2015 Open Communications Security. All rights reserved.
The OpenCS Binary-to-Text library for C (ocsbincodec-c) is a customizable library capable of encode and decode binary values to plain text using multiple standard and non-standard encodings schemes. It is a port of ocsbincodec-java (https://github.com/opencs/ocsbincodec-java).
This library was designed to be as flexible as possible. This means that the implementations in this library will always favor flexibility first.
This code is designed to be as portable as possible. This means that it is expected to work on almost all platforms that supports a few things from C99 compiler. The current list of platforms includes:
- iOS;
- MacOS X;
- Linux;
- Windows;
- IBM z/OS;
- 1.0.0:
- First public version ported from ocsbincodec-java
- Multiple Binary-to-Text encondings
- Binary (customizeble)
- Hexadecimal (RFC4648, customizable)
- Base32 (RFC4648, customizable)
- Base64 (RFC4648, customizable)
- Custom alphabets
- Uniform interface for all encoders/decoders
- Compatible with C# 3.5 and higher (including Windows Phone)
This software is released under the Modified BSD License.
Yes. Just follow the license restrictions.
The library itself is a pure C99 program. The test program (ocsbincodec-test) is implemented in C++ and uses the library Google Test 1.7.0 (https://code.google.com/p/googletest/).
The IDE used was Eclipse Luna with CDT installed.
It was developed on Linux first and ported to Windows (Mingw32) later.
The file names were choosen to be at most 8 characters long. This ensures the compatibility with z/OS dataset member names.
Just copy the files under ocsbincodec-c/include and ocsbincodec-c/src into your project's source, add them to your XCode project.
C API's can be used directly by Objective-C code and, with minor adjusts, from Swift too (https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithCAPIs.html).