Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Namespaces | Typedefs | Functions
stream_utils.hpp File Reference
#include "libzeth/core/include_libsnark.hpp"
#include <iostream>
#include <type_traits>
#include "libzeth/serialization/stream_utils.tcc"
Include dependency graph for stream_utils.hpp:

Go to the source code of this file.

Namespaces

 libzeth
 

Typedefs

template<typename CollectionT >
using libzeth::MemberT = typename std::decay< decltype((*(CollectionT *) nullptr)[0])>::type
 

Functions

template<typename T >
std::enable_if< std::is_fundamental< T >::value, T >::type libzeth::read_bytes (std::istream &in_s)
 Read a primitive datatype from a stream as raw bytes. More...
 
template<typename T >
std::enable_if< std::is_fundamental< T >::value, void >::type libzeth::read_bytes (T &val, std::istream &in_s)
 Read a primitive datatype from a stream as raw bytes. More...
 
template<typename T >
std::enable_if< std::is_fundamental< T >::value, void >::type libzeth::write_bytes (const T &val, std::ostream &out_s)
 
template<typename CollectionT , void(WriterT)(const MemberT< CollectionT > &, std::ostream &) >
void libzeth::collection_n_write_bytes (const CollectionT &collection, const size_t n, std::ostream &out_s)
 
template<typename CollectionT , void(ReaderT)(MemberT< CollectionT > &, std::istream &) >
void libzeth::collection_n_read_bytes_n (CollectionT &collection, const size_t n, std::istream &in_s)
 
template<typename CollectionT , void(WriterT)(const MemberT< CollectionT > &, std::ostream &) >
void libzeth::collection_write_bytes (const CollectionT &collection, std::ostream &out_s)
 
template<typename CollectionT , void(ReaderT)(MemberT< CollectionT > &, std::istream &) >
void libzeth::collection_read_bytes (CollectionT &points, std::istream &in_s)
 
template<typename T , void(ReaderFn)(T &, std::istream &) >
void libzeth::sparse_vector_read_bytes (libsnark::sparse_vector< T > &sparse_vector, std::istream &in_s)
 
template<typename T , void(WriterFn)(const T &, std::ostream &) >
void libzeth::sparse_vector_write_bytes (const libsnark::sparse_vector< T > &sparse_vector, std::ostream &out_s)
 
template<typename T , void(ReaderFn)(T &, std::istream &) >
void libzeth::accumulation_vector_read_bytes (libsnark::accumulation_vector< T > &acc_vector, std::istream &in_s)
 
template<typename T , void(WriterFn)(const T &, std::ostream &) >
void libzeth::accumulation_vector_write_bytes (const libsnark::accumulation_vector< T > &acc_vector, std::ostream &out_s)
 
template<typename kcT >
void libzeth::knowledge_commitment_read_bytes (kcT &knowledge_commitment, std::istream &in_s)
 
template<typename kcT >
void libzeth::knowledge_commitment_write_bytes (const kcT &knowledge_commitment, std::ostream &out_s)
 
template<typename kcvectorT >
void libzeth::knowledge_commitment_vector_read_bytes (kcvectorT &knowledge_commitment, std::istream &in_s)
 
template<typename kcvectorT >
void libzeth::knowledge_commitment_vector_write_bytes (const kcvectorT &knowledge_commitment, std::ostream &out_s)