Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
libtool
tool_util.cpp
Go to the documentation of this file.
1
// Copyright (c) 2015-2022 Clearmatics Technologies Ltd
2
//
3
// SPDX-License-Identifier: LGPL-3.0+
4
5
#include "
libtool/tool_util.hpp
"
6
7
namespace
libtool
8
{
9
10
std::ifstream
open_binary_input_file
(
const
std::string &
filename
)
11
{
12
std::ifstream in_s(
13
filename
.c_str(), std::ios_base::in | std::ios_base::binary);
14
in_s.exceptions(
15
std::ios_base::eofbit | std::ios_base::badbit | std::ios_base::failbit);
16
return
in_s;
17
}
18
19
std::ofstream
open_binary_output_file
(
const
std::string &
filename
)
20
{
21
std::ofstream out_s(
22
filename
.c_str(), std::ios_base::out | std::ios_base::binary);
23
return
out_s;
24
}
25
26
}
// namespace libtool
analyzer.parse_r1cs.filename
string filename
Definition:
parse_r1cs.py:111
tool_util.hpp
libtool
Utilities that are likely to be useful for command line tools.
Definition:
command.hpp:10
libtool::open_binary_output_file
std::ofstream open_binary_output_file(const std::string &filename)
Utility function to open a binary file for writing, with appropriate flags.
Definition:
tool_util.cpp:19
libtool::open_binary_input_file
std::ifstream open_binary_input_file(const std::string &filename)
Definition:
tool_util.cpp:10
Generated on Mon Nov 28 2022 10:29:03 for Zeth - Zerocash on Ethereum by
1.8.17