Botan 2.13.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::ASN1_Pretty_Printer Class Referencefinal

`#include <asn1_print.h>`

Inheritance diagram for Botan::ASN1_Pretty_Printer:

## Public Member Functions
| ASN1_Pretty_Printer (size_t print_limit=4096, size_t print_binary_limit=2048, bool print_context_specific=true, size_t initial_level=0, size_t value_column=60, size_t max_depth=64)
std::string | print (const uint8_t in[], size_t len) const
template<typename Alloc >
std::string | print (const std::vector< uint8_t, Alloc > &vec) const
void | print_to_stream (std::ostream &out, const uint8_t in[], size_t len) const

## Detailed Description

Format ASN.1 data into human readable output. The exact form of the output for any particular input is not guaranteed and may change from release to release.

Definition at line 81 of file asn1_print.h.

## Constructor & Destructor Documentation

Botan::ASN1_Pretty_Printer::ASN1_Pretty_Printer | ( | size_t | print_limit = `4096`,
|  | size_t | print_binary_limit = `2048`,
|  | bool | print_context_specific = `true`,
|  | size_t | initial_level = `0`,
|  | size_t | value_column = `60`,
|  | size_t | max_depth = `64`
| ) |  |
| inline

Parameters

  print_limit | strings larger than this are not printed
  print_binary_limit | binary strings larger than this are not printed
  print_context_specific | if true, try to parse nested context specific data.
  initial_level | the initial depth (0 or 1 are the only reasonable values)
  value_column | ASN.1 values are lined up at this column in output
  max_depth | do not recurse more than this many times. If zero, recursion is unbounded.

Definition at line 93 of file asn1_print.h.

98 :
99 ASN1_Formatter(print_context_specific, max_depth),
100 m_print_limit(print_limit),
101 m_print_binary_limit(print_binary_limit),
102 m_initial_level(initial_level),
103 m_value_column(value_column)
104 {}
Botan::ASN1_Formatter::ASN1_Formatter
ASN1_Formatter(bool print_context_specific, size_t max_depth)
Definition: asn1_print.h:32

## Member Function Documentation

std::string Botan::ASN1_Formatter::print | ( | const uint8_t | in[],
|  | size_t | len
| ) |  | const
| inherited

Definition at line 59 of file asn1_print.cpp.

References Botan::ASN1_Formatter::print_to_stream().

60 {
61 std::ostringstream output;
62 print_to_stream(output, in, len);
63 return output.str();
64 }
Botan::ASN1_Formatter::print_to_stream
void print_to_stream(std::ostream &out, const uint8_t in[], size_t len) const
Definition: asn1_print.cpp:66
template<typename Alloc >

std::string Botan::ASN1_Formatter::print | ( | const std::vector< uint8_t, Alloc > & | vec | ) | const
| inline inherited

Definition at line 44 of file asn1_print.h.

45 {
46 return print(vec.data(), vec.size());
47 }
Botan::ASN1_Formatter::print
std::string print(const uint8_t in[], size_t len) const
Definition: asn1_print.cpp:59

void Botan::ASN1_Formatter::print_to_stream | ( | std::ostream & | out,
|  | const uint8_t | in[],
|  | size_t | len
| ) |  | const
| inherited

Definition at line 66 of file asn1_print.cpp.

Referenced by Botan::ASN1_Formatter::print().

69 {
70 BER_Decoder dec(in, len);
71 decode(output, dec, 0);
72 }

The documentation for this class was generated from the following files:

- src/lib/asn1/asn1_print.h
- src/lib/asn1/asn1_print.cpp