Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
group_element_utils.hpp
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 #ifndef __ZETH_CORE_GROUP_ELEMENT_UTILS_HPP__
6 #define __ZETH_CORE_GROUP_ELEMENT_UTILS_HPP__
7 
8 #include "include_libff.hpp"
9 
10 namespace libzeth
11 {
12 
14 template<typename GroupT>
15 void group_element_write_json(const GroupT &point, std::ostream &out_s);
16 
18 template<typename GroupT>
19 void group_element_read_json(GroupT &point, std::istream &in_s);
20 
22 template<typename GroupT>
23 std::string group_element_to_json(const GroupT &point);
24 
26 template<typename GroupT>
27 GroupT group_element_from_json(const std::string &json);
28 
32 template<typename GroupT>
33 void group_element_write_bytes(const GroupT &point, std::ostream &out_s);
34 
37 template<typename GroupT>
38 void group_element_read_bytes(GroupT &point, std::istream &in_s);
39 
42 template<typename GroupCollectionT>
44  const GroupCollectionT &points, std::ostream &out_s);
45 
48 template<typename GroupCollectionT>
49 void group_elements_read_bytes(GroupCollectionT &points, std::istream &in_s);
50 
51 } // namespace libzeth
52 
54 
55 #endif // __ZETH_CORE_GROUP_ELEMENT_UTILS_HPP__
include_libff.hpp
libzeth
Definition: binary_operation.hpp:15
group_element_utils.tcc
libzeth::group_element_write_json
void group_element_write_json(const GroupT &point, std::ostream &out_s)
Write a group element as a json string to a stream.
libzeth::group_element_to_json
std::string group_element_to_json(const GroupT &point)
Convert a group element to a json string (array of hexadecimal strings).
libzeth::group_element_read_json
void group_element_read_json(GroupT &point, std::istream &in_s)
Read a JSON string from a stream and convert it into a group element.
libzeth::group_elements_write_bytes
void group_elements_write_bytes(const GroupCollectionT &points, std::ostream &out_s)
libzeth::group_element_read_bytes
void group_element_read_bytes(GroupT &point, std::istream &in_s)
libzeth::group_element_from_json
GroupT group_element_from_json(const std::string &json)
Convert a JSON string into a group element.
libzeth::group_elements_read_bytes
void group_elements_read_bytes(GroupCollectionT &points, std::istream &in_s)
libzeth::group_element_write_bytes
void group_element_write_bytes(const GroupT &point, std::ostream &out_s)