ASN1 Encoder & Decoder based on pycrate.
Currently supporting ASN1(s) of various versions of below specifications:
- GSMA SGP.22
- TCA eUICC_Profile_Package (SAIP)
- GSMA SGP.32
However, Tool can be extended to support any ASN1 based conversion.
Refer Url(s) of AmenityPj for details.
Steps can be found here.
There are various ways to Get Started:
- Online Mode
- Offline Mode (Requires Download / Cloning of the Repo)
- Code can be directly run from
asn1Play/asn1_play/main/asn1play.py
using any IDE - Local Web Server App amenitypj can be used
- Code can be directly run from
Issue tracker can be found here.
- Auto Trimming of HEX Data (White Spaces Deletion).
- Auto Detection of Base64 & Hex data.
- Auto Detection of ByteArraySigned & ByteArrayUnSigned.
- Conversion Mode for HEX, ASCII, TEXT & Base64.
- Support of "Individual Mode"; Raw/Target Data can be configured Directly or file path (Binary as well as Text File; any extension) can be passed.
- Support of "Bulk Mode"; Raw/Target Data can be configured Directly in List/Array format or Directory Path can be passed (Files with Known extensions will be picked based on Input Format).
- Support of "Yml Mode (Config Mode)"; Raw/Target Data (along with all needed config) can be configured Directly in Yaml Files (".yaml" or ".yml" extensions), and same cane be passed in "Individual Mode" or "Bulk Mode".
- For Known File Extensions (".asn1", ".asn", ".base64", ".hex"), Input/Output Format may be modified automatically as per sensible out-of-the-box defaults.
- \asn1Play\Data\SampleData: Sample Data folder containing various version specific data files.
- \asn1Play\Data\UserData: User Data folder containing various version specific data files (Default Output Directory).
To Refer Sample usages, search for below keywords in source code (\asn1Play\asn1_play\main\data_type) and/or in data folders.
- .Asn1Files;
- .Base64Files;
- .HexFiles;
- .YmlFiles;
- AsciiInput;
- AsciiOutput;
- TxtInput;
- TxtOutput;
- Asn1Element;
- Asn1Schema;
- Asn1ElementString;
- Asn1ElementVariable;
- Asn1Input;
- Asn1Output;
- Base64Input;
- Base64Output;
- BulkMode;
- ByteArrayInput;
- ByteArrayOutput;
- ByteArraySignedInput;
- ByteArraySignedOutput;
- Certificate;
- Der64Input;
- Der64Output;
- DerInput;
- DerOutput;
- DirectInput;
- DirectoryInput;
- DirectoryOutput;
- EimConfigurationData;
- ExportKeyword;
- ExportedInput;
- ExtendRemarksList;
- FileInput;
- HexInput;
- HexOutput;
- ItemIndexVariable;
- ListInput;
- OutputFile;
- OutputKeyword;
- PE_End;
- ProfileElement;
- ReParseOutput;
- RemarksVariable;
- StoreMetadataRequest;
- TlvParsing;
- UpdateMetadataRequest;
- VersionVariable;
- YmlInput;
- YmlOutput;
- YmlOutputSameFile;
- $VERSION
- Used for input_path, when version of asn specification needs to be considered in file path on run time.
- $REMARKS
- Used for output_file_path, when Remarks needs to be considered in output path.
- $ASN1_ELEMENT
- Used for remarks, when Asn Element Name needs to be considered in remarks.
- $ITEM_INDEX
- Used for output_file_path, when Item Index (For Bulk Mode) needs to be considered in output path.
- output
- Used for output in file.
- export
- Used for export mode. Export of configuration in .yml file.
- For output_file, Both "directory path" and "file path" (identified based on any extension) are supported, Hence a path without extension will be considered as directory.
- For input/output via files/directory, always enclosed path with r''. Here "r" denotes raw string and avoid escape sequences, otherwise it might be considered as normal input.
- output keyword always utilize comments
- output file utilize comments in case of directory or if file name is having $REMARKS