CryptoSys PKI  23.0.0
Public Types | Static Public Member Functions | List of all members
dipki::Asn1 Class Reference

ASN.1 utilities. More...

Public Types

enum  Opts : unsigned int
 Asn options More...
 

Static Public Member Functions

static int TextDump (const std::string &outputFile, const std::string &asn1File, Opts opts=Opts::None)
 Dump details of an ASN.1 formatted data file to a text file. More...
 
static std::string TextDumpToString (const std::string &asn1File, Opts opts=Opts::None)
 Dump details of ASN.1 formatted data to a string. More...
 
static std::string Type (const std::string &asn1File)
 Describe the type of ASN.1 data. More...
 

Detailed Description

ASN.1 utilities.

Member Enumeration Documentation

◆ Opts

enum dipki::Asn1::Opts : unsigned int

Asn options

Enumerator
None 

No options [default].

NoComments 

Hide the comments [default=show comments].

AddLevels 

Show level numbers [default=hide level numbers].

Member Function Documentation

◆ TextDump()

static int dipki::Asn1::TextDump ( const std::string &  outputFile,
const std::string &  asn1File,
Opts  opts = Opts::None 
)
static

Dump details of an ASN.1 formatted data file to a text file.

Parameters
outputFileFilename of text file to be created
asn1FileFilename of ASN.1 formatted data file to be analyzed (or a string containing its base64 or PEM representation)
optsOption flags (optional).
Returns
Zero if successful.

◆ TextDumpToString()

static std::string dipki::Asn1::TextDumpToString ( const std::string &  asn1File,
Opts  opts = Opts::None 
)
static

Dump details of ASN.1 formatted data to a string.

Parameters
asn1FileFilename of ASN.1 formatted data file to be analyzed (or a string containing its base64 or PEM representation)
optsOption flags (optional).
Returns
String containing the output.
Remarks
This function creates a temporary file in the system TEMP directory. This file is locked and is automatically deleted after use.

◆ Type()

static std::string dipki::Asn1::Type ( const std::string &  asn1File)
static

Describe the type of ASN.1 data.

Parameters
asn1FileFilename of ASN.1 formatted data file to be analyzed (or a string containing its base64 or PEM representation)
Returns
String containing the name of the type of ASN.1 data or the empty string if not found
Copyright © 2004-24 D.I. Management Services Pty Limited t/a CryptoSys ABN 78 083 210 584 Australia. All rights reserved. <www.di-mgt.com.au> <www.cryptosys.net>. Generated on Mon Sep 23 2024 15:37:33 by Doxygen 1.9.1.