Decode your own ASN.1 encoded value using MARBEN ASN.1 Value Editor

In order to decode your own ASN.1 encoded data, you have to define first its ASN.1 environment, i.e. to which ASN.1 description does it conform ? which are the encoding rules (BER, PER, ...)? It is what we call the "ASN.1 Project"...

Build your ASN.1 project

What is an ASN.1 project ?

An ASN.1 Project is a kind of configuration file where are defined the ASN.1 description and the ASN.1 encoding rules used to encode or decode any value that conforms to this ASN.1 description.

Create your ASN.1 Project

Create a new ASN.1 project using File > New > ASN.1 Project menu.

How to create an ASN.1 project ?

You will get the Create project window. Browse the directory where you want to create your project, enter a filename, and click on Create project button.

Create Project window

At this stage, the new project is created.
Refresh the navigator panel (right click on path where the project has been created) if the project file (suffixed with .pra) does not appear in the navigator (left) panel.

Refresh the navigator

Define your ASN.1 description

Add your own ASN.1 private syntax using the Add Files button in the editor (central) panel

How to include ASN.1 file ?

You will get the Add files window. Browse to the directory containing your private syntax, select the ASN.1 file, and click on Add files button. You can select multiple ASN.1 files.

Select ASN.1 files

At this stage, your ASN.1 file is included in the project.

Set your encoding rules

In the editor panel, select the encoding rules corresponding to your ASN.1 description, and maybe some additional configuration parameters.

Select ASN.1 files

Compile your ASN.1 project

Why do you need to compile your ASN.1 Project ?

The ASN.1 files included in your project must be compiled to check the validity of your ASN.1 description and to generate the information needed to display, encode, decode and export your ASN.1 values.

How to compile your ASN.1 project ?

Compile the ASN.1 project using Run > Compile menu

Select ASN.1 files

Compilation result

A Compilation in progress window informs you about the progress and the result of the compilation.

If there is no errors in the ASN.1 description, the result is successful (green lights)

Select ASN.1 files

If the compilation fails (red lights) and a list of errors is displayed in the Problems area.

Select ASN.1 files

Decode your ASN.1 encoded value

Decode your value using Run > Decode > File menu.

Select ASN.1 files

You will get the Decode a file window. Browse the directory where the ASN.1 data is stored, select the ASN.1 data, and click on Decode a file button.

Select ASN.1 files

You can also run Decode > File after a right click on the ASN.1 data in the Navigator panel.

Select ASN.1 files

The decoded value is displayed in the editor panel. Click on each ASN.1 Value on the left part of this editor panel to see its content in the right part.

Select ASN.1 files

Get the XML representation of a decoded value

You can copy the decoded value using Copy after a right click on the value in the right part of the editor panel.

Select ASN.1 files

The ASN.1 value copied from the ASN.1 Value Editor are pasted in XML format in external text-based applications such as mail clients, text editors and so on:

<?xml version="1.0" encoding="UTF-8"?>
<MyType>
  <firstComponent>10</firstComponent>
  <secondComponent>
    <false/>
  </secondComponent>
</MyType>