Is there a good C++ library to read, create and modify BER encoded files?

Daan picture Daan · Jan 17, 2013 · Viewed 12.6k times · Source

There are several tools that can automatically generate C++ (or other) code for reading and writing BER encoded files. In my C++ project, I need libraries to read and modify BER encoded files. I can not generate C++ classes based on a given data structure because there is no given data structure. The user should be able to add and delete integers, strings etc. I found an open source project that has an editor with this kind of functionality: http://www.codeproject.com/Articles/4910/ASN-1-Editor

However, this is in C# ....

Please let me know, if you know how I can get a good C++ library with this functionality which I can use for my C++ project.

Answer

paper.plane picture paper.plane · Jan 17, 2013

Make sure that you have a correct ASN defintion file. Then go to link http://lionet.info/asn1c/asn1c.cgi

paste your ASN definition in the given window. Press the button "Proceed with ASN.1 compilation". If you get any compilation error rectify those. After the compilation is successful it will generate the code for your decoder. Give it a try its good.