Electroneum
Base58Fuzzer Class Reference
Inheritance diagram for Base58Fuzzer:
Collaboration diagram for Base58Fuzzer:

Public Member Functions

 Base58Fuzzer ()
 
virtual int init ()
 
virtual int run (const std::string &filename)
 

Detailed Description

Definition at line 34 of file base58.cpp.

Constructor & Destructor Documentation

◆ Base58Fuzzer()

Base58Fuzzer::Base58Fuzzer ( )
inline

Definition at line 37 of file base58.cpp.

37 {}

Member Function Documentation

◆ init()

int Base58Fuzzer::init ( )
virtual

Reimplemented from Fuzzer.

Definition at line 42 of file base58.cpp.

43 {
44  return 0;
45 }

◆ run()

int Base58Fuzzer::run ( const std::string &  filename)
virtual

Implements Fuzzer.

Definition at line 47 of file base58.cpp.

48 {
49  std::string s;
50 
52  {
53  std::cout << "Error: failed to load file " << filename << std::endl;
54  return 1;
55  }
56  try
57  {
58  std::string data;
59  tools::base58::decode(s, data);
60  }
61  catch (const std::exception &e)
62  {
63  std::cerr << "Failed to load from binary: " << e.what() << std::endl;
64  return 1;
65  }
66  return 0;
67 }
::std::string string
Definition: gtest-port.h:1097
bool decode(const std::string &enc, std::string &data)
Definition: base58.cpp:196
bool load_file_to_string(const std::string &path_to_file, std::string &target_str, size_t max_size=1000000000)
Here is the call graph for this function:

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