Fabcoin Core  0.16.2
P2P Digital Currency
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
dev Namespace Reference

Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Originally by René Nyffenegger. More...

Namespaces

 bzz
 
 con
 
 crypto
 
 eth
 
 evmjit
 
 keccak
 
 p2p
 
 rmd160
 
 rpc
 
 shh
 
 test
 

Classes

struct  BadRoot
 
class  concurrent_queue
 Concurrent queue. More...
 
struct  Converter
 
struct  Converter< bigint >
 
struct  Converter< bytes >
 
struct  Converter< FixedHash< N > >
 
struct  Converter< RLPs >
 
struct  Converter< std::array< T, N > >
 
struct  Converter< std::pair< T, U > >
 
struct  Converter< std::set< T > >
 
struct  Converter< std::string >
 
struct  Converter< std::unordered_set< T > >
 
struct  Converter< std::vector< T > >
 
struct  Converter< u160 >
 
struct  Converter< u256 >
 
struct  Converter< uint16_t >
 
struct  Converter< uint32_t >
 
struct  Converter< uint64_t >
 
struct  Converter< uint8_t >
 
struct  DBChannel
 
struct  DBWarn
 
struct  DebugChannel
 
class  EnforceRefs
 
class  EthereumMaster
 
class  EthereumSlave
 
struct  Exception
 Base class for all exceptions. More...
 
struct  ExternalFunctionFailure
 
class  FatGenericTrieDB
 
class  FixedHash
 Fixed-size raw-byte array container type, with an API optimised for storing hashes. More...
 
struct  GenericGuardBool
 
class  GenericTrieDB
 Merkle Patricia Tree "Trie": a modifed base-16 Radix tree. More...
 
struct  GenericUnguardBool
 
struct  GenericUnguardSharedBool
 
class  HashedGenericTrieDB
 
class  HasInvariants
 Inheritable for classes that have invariants. More...
 
struct  InterfaceNotSupported
 
struct  intTraits
 
struct  intTraits< bigint >
 
struct  intTraits< u160 >
 
struct  intTraits< u256 >
 
struct  InvalidTrie
 
class  InvariantChecker
 RAII checker for invariant assertions. More...
 
class  IpcServerBase
 
class  KeyPair
 Simple class that represents a "key pair". More...
 
struct  LeftChannel
 
struct  LogChannel
 The default logging channels. More...
 
class  LogOutputStream
 Logging class, iostream-like, that can be shifted to. More...
 
class  LogOutputStreamBase
 
class  LogOverride
 
class  LogOverrideAux
 
class  MemoryDB
 
class  MemTrie
 Merkle Patricia Tree "Trie": a modifed base-16 Radix tree. More...
 
class  MemTrieNode
 
class  NetworkFace
 
struct  NibbleSlice
 Nibble-based view on a bytesConstRef. More...
 
struct  NoteChannel
 
class  Notified
 
class  NullOutputStream
 The null output stream. Used when logging is disabled. More...
 
class  OverlayDB
 
class  RangeMask
 Set of elements of a certain "ground range" representable by unions of ranges inside this ground range. More...
 
struct  RightChannel
 
class  RLP
 Class for interpreting Recursive Linear-Prefix Data. More...
 
struct  RLPException
 Base class for all RLP exceptions. More...
 
class  RLPStream
 Class for writing to an RLP bytestream. More...
 
class  RPCMaster
 
class  RPCSlave
 
class  SafeHttpServer
 
class  ScopeGuard
 RAII utility class whose destructor calls a given function. More...
 
class  SecretStore
 Manages encrypted keys stored in a certain directory on disk. More...
 
class  secure_vector
 
class  SecureFixedHash
 
struct  SignatureStruct
 
class  SpecificTrieDB
 Different view on a GenericTrieDB that can use different key types. More...
 
class  SpinLock
 Simple lock that waits for release without making context switch. More...
 
struct  StaticLog2
 Compile-time calculation of Log2 of constant values. More...
 
struct  StaticLog2< 1 >
 
struct  StreamOut
 
struct  StreamOut< S, uint8_t >
 
class  ThreadContext
 
class  Timer
 
struct  TimerChannel
 
class  TimerHelper
 Simple scope-based timer helper. More...
 
struct  TraceChannel
 
class  TransientDirectory
 temporary directory implementation It creates temporary directory in the given path. More...
 
class  TrieBranchNode
 
struct  TrieDBChannel
 
class  TrieExtNode
 
class  TrieInfixNode
 
class  TrieLeafNode
 
class  UnixDomainSocketServer
 
class  vector_ref
 A modifiable reference to an existing object or vector in memory. More...
 
struct  VerbosityHolder
 Temporary changes system's verbosity for specific function. More...
 
struct  WarnChannel
 
class  WebThree
 Main API hub for interfacing with Web 3 components. More...
 
class  WebThreeDirect
 Main API hub for interfacing with Web 3 components. More...
 
class  WhisperMaster
 
class  WhisperSlave
 
class  Worker
 
class  WriteBatchNoter
 

Typedefs

using errinfo_comment = boost::error_info< struct tag_comment, std::string >
 
using bytes = std::vector< byte >
 
using bytesRef = vector_ref< byte >
 
using bytesConstRef = vector_ref< byte const >
 
using bytesSec = secure_vector< byte >
 
using bigint = boost::multiprecision::number< boost::multiprecision::cpp_int_backend<>>
 
using u8 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 8, 8, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >>
 
using u64 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 64, 64, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >>
 
using u128 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >>
 
using u256 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >>
 
using s256 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void >>
 
using u160 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 160, 160, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >>
 
using s160 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 160, 160, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void >>
 
using u512 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 512, 512, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >>
 
using s512 = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 512, 512, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void >>
 
using u256s = std::vector< u256 >
 
using u160s = std::vector< u160 >
 
using u256Set = std::set< u256 >
 
using u160Set = std::set< u160 >
 
using StringMap = std::map< std::string, std::string >
 
using BytesMap = std::map< bytes, bytes >
 
using u256Map = std::map< u256, u256 >
 
using HexMap = std::map< bytes, bytes >
 
using StringHashMap = std::unordered_map< std::string, std::string >
 
using u256HashMap = std::unordered_map< u256, u256 >
 
using strings = std::vector< std::string >
 
using string32 = std::array< char, 32 >
 
using errinfo_invalidSymbol = boost::error_info< struct tag_invalidSymbol, char >
 
using errinfo_wrongAddress = boost::error_info< struct tag_address, std::string >
 
using errinfo_required = boost::error_info< struct tag_required, bigint >
 
using errinfo_got = boost::error_info< struct tag_got, bigint >
 
using errinfo_min = boost::error_info< struct tag_min, bigint >
 
using errinfo_max = boost::error_info< struct tag_max, bigint >
 
using RequirementError = boost::tuple< errinfo_required, errinfo_got >
 
using errinfo_hash256 = boost::error_info< struct tag_hash, h256 >
 
using errinfo_required_h256 = boost::error_info< struct tag_required_h256, h256 >
 
using errinfo_got_h256 = boost::error_info< struct tag_get_h256, h256 >
 
using Hash256RequirementError = boost::tuple< errinfo_required_h256, errinfo_got_h256 >
 
using errinfo_extraData = boost::error_info< struct tag_extraData, bytes >
 
using h2048 = FixedHash< 256 >
 
using h1024 = FixedHash< 128 >
 
using h520 = FixedHash< 65 >
 
using h512 = FixedHash< 64 >
 
using h256 = FixedHash< 32 >
 
using h160 = FixedHash< 20 >
 
using h128 = FixedHash< 16 >
 
using h64 = FixedHash< 8 >
 
using h512s = std::vector< h512 >
 
using h256s = std::vector< h256 >
 
using h160s = std::vector< h160 >
 
using h256Set = std::set< h256 >
 
using h160Set = std::set< h160 >
 
using h256Hash = std::unordered_set< h256 >
 
using h160Hash = std::unordered_set< h160 >
 
using Mutex = std::mutex
 
using RecursiveMutex = std::recursive_mutex
 
using SharedMutex = boost::shared_mutex
 
using Guard = std::lock_guard< std::mutex >
 
using UniqueGuard = std::unique_lock< std::mutex >
 
using RecursiveGuard = std::lock_guard< std::recursive_mutex >
 
using ReadGuard = boost::shared_lock< boost::shared_mutex >
 
using UpgradableGuard = boost::upgrade_lock< boost::shared_mutex >
 
using UpgradeGuard = boost::upgrade_to_unique_lock< boost::shared_mutex >
 
using WriteGuard = boost::unique_lock< boost::shared_mutex >
 
using SpinGuard = std::lock_guard< SpinLock >
 
using UnsignedRange = std::pair< unsigned, unsigned >
 
using UnsignedRanges = std::vector< UnsignedRange >
 
using RLPs = std::vector< RLP >
 
template<class KeyType , class DB >
using TrieDB = SpecificTrieDB< GenericTrieDB< DB >, KeyType >
 
using Secret = SecureFixedHash< 32 >
 
using Public = h512
 A public key: 64 bytes. More...
 
using Signature = h520
 A signature: 65 bytes: r: [0, 32), s: [32, 64), v: 64. More...
 
using Address = h160
 An Ethereum address: 20 bytes. More...
 
using Addresses = h160s
 A vector of Ethereum addresses. More...
 
using AddressHash = std::unordered_set< h160 >
 A hash set of Ethereum addresses. More...
 
using Secrets = std::vector< Secret >
 A vector of secrets. More...
 
using IpcServer = UnixDomainSocketServer
 

Enumerations

enum  WithExisting : int { WithExisting::Trust = 0, WithExisting::Verify, WithExisting::Rescue, WithExisting::Kill }
 
enum  WhenError { WhenError::DontThrow = 0, WhenError::Throw = 1 }
 
enum  HexPrefix { HexPrefix::DontAdd = 0, HexPrefix::Add = 1 }
 
enum  OnFailed { OnFailed::InterpretRaw, OnFailed::Empty, OnFailed::Throw }
 
enum  LogTag { LogTag::None, LogTag::Url, LogTag::Error, LogTag::Special }
 
enum  Verification { Verification::Skip, Verification::Normal }
 
enum  IfRunning { IfRunning::Fail, IfRunning::Join, IfRunning::Detach }
 
enum  WorkerState {
  WorkerState::Starting, WorkerState::Started, WorkerState::Stopping, WorkerState::Stopped,
  WorkerState::Killing
}
 
enum  KDF { KDF::PBKDF2_SHA256, KDF::Scrypt }
 
enum  WorkState { Active = 0, Deleting, Deleted }
 

Functions

bool assertAux (bool _a, char const *_aStr, unsigned _line, char const *_file, char const *_func)
 
template<class A , class B >
bool assertEqualAux (A const &_a, B const &_b, char const *_aStr, char const *_bStr, unsigned _line, char const *_file, char const *_func)
 
template<class _ExceptionType >
void assertThrowAux (bool _condition,::std::string const &_errorDescription, unsigned _line, char const *_file, char const *_function)
 
template<class _ExceptionType >
void assertThrowAux (void const *_pointer,::std::string const &_errorDescription, unsigned _line, char const *_file, char const *_function)
 
std::string toBase64 (bytesConstRef _in)
 
bytes fromBase64 (std::string const &_in)
 
template<size_t N>
std::string toBase36 (FixedHash< N > const &_h)
 
template<size_t N>
FixedHash< N > fromBase36 (std::string const &_h)
 
uint64_t utcTime ()
 Get the current time in seconds since the epoch in UTC. More...
 
string inUnits (bigint const &_b, strings const &_units)
 Converts given int to a string and appends one of a series of units according to its size. More...
 
s256 u2s (u256 _u)
 Interprets _u as a two's complement signed number and returns the resulting s256. More...
 
u256 s2u (s256 _u)
 
unsigned int toLog2 (u256 _x)
 
template<size_t n>
u256 exp10 ()
 
template<>
u256 exp10< 0 > ()
 
template<typename T >
uint64_t toUint64 (T _u)
 Converts given multiprecision number to standard number type. More...
 
template<typename T >
uint8_t toUint8 (T _u)
 
template<class N >
diff (N const &_a, N const &_b)
 
template<class T >
std::string toHex (T const &_data, int _w=2, HexPrefix _prefix=HexPrefix::DontAdd)
 
bytes fromHex (std::string const &_s, WhenError _throw=WhenError::DontThrow)
 
bool isHex (std::string const &_s) noexcept
 
std::string asString (bytes const &_b)
 Converts byte array to a string containing the same (binary) data. More...
 
std::string asString (bytesConstRef _b)
 Converts byte array ref to a string containing the same (binary) data. More...
 
bytes asBytes (std::string const &_b)
 Converts a string to a byte array containing the string's (byte) data. More...
 
bytes asNibbles (bytesConstRef const &_s)
 
template<class T , class Out >
void toBigEndian (T _val, Out &o_out)
 Converts a templated integer value to the big-endian byte-stream represented on a templated collection. More...
 
template<class T , class _In >
T fromBigEndian (_In const &_bytes)
 Converts a big-endian byte-stream represented on a templated collection to a templated integer value. More...
 
std::string toBigEndianString (u256 _val)
 Convenience functions for toBigEndian. More...
 
std::string toBigEndianString (u160 _val)
 
bytes toBigEndian (u256 _val)
 
bytes toBigEndian (u160 _val)
 
template<class T >
bytes toCompactBigEndian (T _val, unsigned _min=0)
 Convenience function for toBigEndian. More...
 
bytes toCompactBigEndian (byte _val, unsigned _min=0)
 
template<class T >
std::string toCompactBigEndianString (T _val, unsigned _min=0)
 Convenience function for toBigEndian. More...
 
std::string toHex (u256 val, HexPrefix prefix=HexPrefix::DontAdd)
 Convenience function for conversion of a u256 to hex. More...
 
std::string toCompactHex (u256 val, HexPrefix prefix=HexPrefix::DontAdd, unsigned _min=0)
 
std::string escaped (std::string const &_s, bool _all=true)
 Escapes a string into the C-string representation. More...
 
template<class T , class _U >
unsigned commonPrefix (T const &_t, _U const &_u)
 
std::string randomWord ()
 Creates a random, printable, word. More...
 
template<class T >
unsigned bytesRequired (T _i)
 Determine bytes required to encode the given integer value. More...
 
template<class T >
void trimFront (T &_t, unsigned _elements)
 Trims a given number of elements from the front of a collection. More...
 
template<class T , class _U >
void pushFront (T &_t, _U _e)
 Pushes an element on to the front of a collection. More...
 
template<class T >
std::vector< T > & operator+= (std::vector< typename std::enable_if< std::is_pod< T >::value, T >::type > &_a, std::vector< T > const &_b)
 Concatenate two vectors of elements of POD types. More...
 
template<class T >
std::vector< T > & operator+= (std::vector< typename std::enable_if<!std::is_pod< T >::value, T >::type > &_a, std::vector< T > const &_b)
 Concatenate two vectors of elements. More...
 
template<class T , class U >
std::set< T > & operator+= (std::set< T > &_a, U const &_b)
 Insert the contents of a container into a set. More...
 
template<class T , class U >
std::unordered_set< T > & operator+= (std::unordered_set< T > &_a, U const &_b)
 Insert the contents of a container into an unordered_set. More...
 
template<class T , class U >
std::vector< T > & operator+= (std::vector< T > &_a, U const &_b)
 Concatenate the contents of a container onto a vector. More...
 
template<class T , class U >
std::set< Toperator+ (std::set< T > _a, U const &_b)
 Insert the contents of a container into a set. More...
 
template<class T , class U >
std::unordered_set< Toperator+ (std::unordered_set< T > _a, U const &_b)
 Insert the contents of a container into an unordered_set. More...
 
template<class T , class U >
std::vector< Toperator+ (std::vector< T > _a, U const &_b)
 Concatenate the contents of a container onto a vector. More...
 
template<class T >
std::vector< Toperator+ (std::vector< T > const &_a, std::vector< T > const &_b)
 Concatenate two vectors of elements. More...
 
template<class T >
std::set< T > & operator+= (std::set< T > &_a, std::set< T > const &_b)
 Merge two sets of elements. More...
 
template<class T >
std::set< Toperator+ (std::set< T > const &_a, std::set< T > const &_b)
 Merge two sets of elements. More...
 
template<class A , class B >
std::unordered_map< A, B > & operator+= (std::unordered_map< A, B > &_x, std::unordered_map< A, B > const &_y)
 
template<class A , class B >
std::unordered_map< A, B > operator+ (std::unordered_map< A, B > const &_x, std::unordered_map< A, B > const &_y)
 
std::string toString (string32 const &_s)
 Make normal string from fixed-length string. More...
 
template<class T , class U >
std::vector< TkeysOf (std::map< T, U > const &_m)
 
template<class T , class U >
std::vector< TkeysOf (std::unordered_map< T, U > const &_m)
 
template<class T , class U >
std::vector< U > valuesOf (std::map< T, U > const &_m)
 
template<class T , class U >
std::vector< U > valuesOf (std::unordered_map< T, U > const &_m)
 
template<class T , class V >
bool contains (T const &_t, V const &_v)
 
std::string getPassword (std::string const &_prompt)
 Requests the user to enter a password on the console. More...
 
bytes contents (std::string const &_file)
 Retrieve and returns the contents of the given file. More...
 
bytesSec contentsSec (std::string const &_file)
 Secure variation. More...
 
std::string contentsString (std::string const &_file)
 Retrieve and returns the contents of the given file as a std::string. More...
 
bytesRef contentsNew (std::string const &_file, bytesRef _dest=bytesRef())
 Retrieve and returns the allocated contents of the given file; if is given, don't allocate, use it directly. More...
 
void writeFile (std::string const &_file, bytesConstRef _data, bool _writeDeleteRename=false)
 Write the given binary data into the given file, replacing the file if it pre-exists. More...
 
void writeFile (std::string const &_file, bytes const &_data, bool _writeDeleteRename=false)
 Write the given binary data into the given file, replacing the file if it pre-exists. More...
 
void writeFile (std::string const &_file, std::string const &_data, bool _writeDeleteRename=false)
 
std::string memDump (bytes const &_bytes, unsigned _width=8, bool _html=false)
 Nicely renders the given bytes to a string, optionally as HTML. More...
 
std::ostream & operator<< (std::ostream &_out, bytes const &_e)
 
template<class T >
std::ostream & operator<< (std::ostream &_out, std::vector< T > const &_e)
 
template<class T , std::size_t Z>
std::ostream & operator<< (std::ostream &_out, std::array< T, Z > const &_e)
 
template<class T , class U >
std::ostream & operator<< (std::ostream &_out, std::pair< T, U > const &_e)
 
template<class T >
std::ostream & operator<< (std::ostream &_out, std::list< T > const &_e)
 
template<class T1 , class T2 , class T3 >
std::ostream & operator<< (std::ostream &_out, std::tuple< T1, T2, T3 > const &_e)
 
template<class T , class U >
std::ostream & operator<< (std::ostream &_out, std::map< T, U > const &_e)
 
template<class T , class U >
std::ostream & operator<< (std::ostream &_out, std::unordered_map< T, U > const &_e)
 
template<class T , class U >
std::ostream & operator<< (std::ostream &_out, std::set< T, U > const &_e)
 
template<class T , class U >
std::ostream & operator<< (std::ostream &_out, std::unordered_set< T, U > const &_e)
 
template<class T , class U >
std::ostream & operator<< (std::ostream &_out, std::multimap< T, U > const &_e)
 
template<class _S , class _T >
_S & operator<< (_S &_out, std::shared_ptr< _T > const &_p)
 
template<class T >
std::string toString (std::chrono::time_point< T > const &_e, std::string _format="%F %T")
 
template<class S , class T >
Sstreamout (S &_out, std::vector< T > const &_e)
 
template<class S , class T , std::size_t Z>
Sstreamout (S &_out, std::array< T, Z > const &_e)
 
template<class S , class T >
Sstreamout (S &_out, std::list< T > const &_e)
 
template<class S , class T , class U >
Sstreamout (S &_out, std::pair< T, U > const &_e)
 
template<class S , class T1 , class T2 , class T3 >
Sstreamout (S &_out, std::tuple< T1, T2, T3 > const &_t)
 
template<class S , class T , class U >
Sstreamout (S &_out, std::map< T, U > const &_v)
 
template<class S , class T , class U >
Sstreamout (S &_out, std::unordered_map< T, U > const &_v)
 
template<class S , class T >
Sstreamout (S &_out, std::set< T > const &_v)
 
template<class T >
std::ostream & operator<< (std::ostream &_out, std::set< T > const &_e)
 
template<class S , class T >
Sstreamout (S &_out, std::unordered_set< T > const &_v)
 
template<class T >
std::ostream & operator<< (std::ostream &_out, std::unordered_set< T > const &_e)
 
template<class S , class T >
Sstreamout (S &_out, std::multiset< T > const &_v)
 
template<class T >
std::ostream & operator<< (std::ostream &_out, std::multiset< T > const &_e)
 
template<class S , class T , class U >
Sstreamout (S &_out, std::multimap< T, U > const &_v)
 
template<class _T >
std::string toString (_T const &_t)
 Converts arbitrary value to string representation using std::stringstream. More...
 
bytes jsToBytes (string const &_s, OnFailed _f)
 
bytes padded (bytes _b, unsigned _l)
 Add '0' on, or remove items from, the front of _b until it is of length _l. More...
 
bytes paddedRight (bytes _b, unsigned _l)
 Add '0' on, or remove items from, the back of _b until it is of length _l. More...
 
bytes unpadded (bytes _s)
 Removing all trailing '0'. Returns empty array if input contains only '0' char. More...
 
bytes unpadLeft (bytes _s)
 Remove all 0 byte on the head of _s. More...
 
string fromRaw (h256 _n)
 Convert h256 into user-readable string (by directly using std::string constructor). If it can't be interpreted as an ASCII string, empty string is returned. More...
 
template<unsigned S>
std::string toJS (FixedHash< S > const &_h)
 
template<unsigned N>
std::string toJS (boost::multiprecision::number< boost::multiprecision::cpp_int_backend< N, N, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> const &_n)
 
std::string toJS (bytes const &_n, std::size_t _padding=0)
 
template<unsigned T>
std::string toJS (SecureFixedHash< T > const &_i)
 
template<typename T >
std::string toJS (T const &_i)
 
bytes jsToBytes (std::string const &_s, OnFailed _f=OnFailed::Empty)
 Convert string to byte array. More...
 
template<unsigned N>
FixedHash< N > jsToFixed (std::string const &_s)
 
template<unsigned N>
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< N *8, N *8, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void > > jsToInt (std::string const &_s)
 Convert a string representation of a number to an int String can be a normal decimal number, or a hex prefixed by 0x or 0X, or an octal if prefixed by 0 Returns 0 in case of failure. More...
 
u256 jsToU256 (std::string const &_s)
 
std::string jsToDecimal (std::string const &_s)
 
 DEV_SIMPLE_EXCEPTION_RLP (BadCast)
 
 DEV_SIMPLE_EXCEPTION_RLP (BadRLP)
 
 DEV_SIMPLE_EXCEPTION_RLP (OversizeRLP)
 
 DEV_SIMPLE_EXCEPTION_RLP (UndersizeRLP)
 
 DEV_SIMPLE_EXCEPTION (BadHexCharacter)
 
 DEV_SIMPLE_EXCEPTION (NoNetworking)
 
 DEV_SIMPLE_EXCEPTION (NoUPnPDevice)
 
 DEV_SIMPLE_EXCEPTION (RootNotFound)
 
 DEV_SIMPLE_EXCEPTION (FileError)
 
 DEV_SIMPLE_EXCEPTION (Overflow)
 
 DEV_SIMPLE_EXCEPTION (FailedInvariant)
 
 DEV_SIMPLE_EXCEPTION (ValueTooLarge)
 
void setDataDir (std::string const &_dir)
 Sets the data dir for the default ("ethereum") prefix. More...
 
std::string getDataDir (std::string _prefix="ethereum")
 
std::string getDefaultDataDir (std::string _prefix="ethereum")
 
void setIpcPath (std::string const &_ipcPath)
 Sets the ipc socket dir. More...
 
std::string getIpcPath ()
 
template<unsigned N>
std::ostream & operator<< (std::ostream &_out, FixedHash< N > const &_h)
 Stream I/O for the FixedHash class. More...
 
template<unsigned N>
std::ostream & operator<< (std::ostream &_out, SecureFixedHash< N > const &_h)
 Stream I/O for the SecureFixedHash class. More...
 
h160 right160 (h256 const &_t)
 Convert the given value into h160 (160-bit unsigned integer) using the right 20 bytes. More...
 
h160 left160 (h256 const &_t)
 Convert the given value into h160 (160-bit unsigned integer) using the left 20 bytes. More...
 
h128 fromUUID (std::string const &_uuid)
 
std::string toUUID (h128 const &_uuid)
 
std::string toString (h256s const &_bs)
 
h256 sha256 (bytesConstRef _input)
 
h160 ripemd160 (bytesConstRef _input)
 
void simpleDebugOut (std::string const &, char const *)
 A simple log-output function that prints log messages to stdout. More...
 
bool isChannelVisible (std::type_info const *_ch, bool _default)
 
template<class Channel >
bool isChannelVisible ()
 
void setThreadName (std::string const &_n)
 Set the current thread's log name. More...
 
std::string getThreadName ()
 Set the current thread's log name. More...
 
std::ostream & operator<< (std::ostream &_out, MemoryDB const &_m)
 
template<class T >
std::ostream & operator<< (std::ostream &_out, RangeMask< T > const &_r)
 
template<class _T >
void rlpListAux (RLPStream &_out, _T _t)
 
template<class _T , class... _Ts>
void rlpListAux (RLPStream &_out, _T _t, _Ts..._ts)
 
template<class _T >
bytes rlp (_T _t)
 Export a single item in RLP format, returning a byte array. More...
 
bytes rlpList ()
 Export a list of items in RLP format, returning a byte array. More...
 
template<class... _Ts>
bytes rlpList (_Ts..._ts)
 
std::ostream & operator<< (std::ostream &_out, dev::RLP const &_d)
 Human readable version of RLP. More...
 
bool sha3 (bytesConstRef _input, bytesRef o_output)
 Calculate SHA3-256 hash of the given input and load it into the given output. More...
 
h256 sha3 (bytesConstRef _input)
 Calculate SHA3-256 hash of the given input, returning as a 256-bit hash. More...
 
SecureFixedHash< 32 > sha3Secure (bytesConstRef _input)
 
h256 sha3 (bytes const &_input)
 Calculate SHA3-256 hash of the given input, returning as a 256-bit hash. More...
 
SecureFixedHash< 32 > sha3Secure (bytes const &_input)
 
h256 sha3 (std::string const &_input)
 Calculate SHA3-256 hash of the given input (presented as a binary-filled string), returning as a 256-bit hash. More...
 
SecureFixedHash< 32 > sha3Secure (std::string const &_input)
 
template<unsigned N>
h256 sha3 (FixedHash< N > const &_input)
 Calculate SHA3-256 hash of the given input (presented as a FixedHash), returns a 256-bit hash. More...
 
template<unsigned N>
SecureFixedHash< 32 > sha3Secure (FixedHash< N > const &_input)
 
SecureFixedHash< 32 > sha3 (bytesSec const &_input)
 Fully secure variants are equivalent for sha3 and sha3Secure. More...
 
SecureFixedHash< 32 > sha3Secure (bytesSec const &_input)
 
template<unsigned N>
SecureFixedHash< 32 > sha3 (SecureFixedHash< N > const &_input)
 
template<unsigned N>
SecureFixedHash< 32 > sha3Secure (SecureFixedHash< N > const &_input)
 
std::string sha3 (std::string const &_input, bool _isNibbles)
 Calculate SHA3-256 hash of the given input, possibly interpreting it as nibbles, and return the hash as a string filled with binary data. More...
 
void sha3mac (bytesConstRef _secret, bytesConstRef _plain, bytesRef _output)
 Calculate SHA3-256 MAC. More...
 
std::string hexPrefixEncode (bytes const &_hexVector, bool _leaf, int _begin, int _end)
 
std::string hexPrefixEncode (bytesConstRef _data, bool _leaf, int _beginNibble, int _endNibble, unsigned _offset)
 
std::string hexPrefixEncode (bytesConstRef _d1, unsigned _o1, bytesConstRef _d2, unsigned _o2, bool _leaf)
 
byte uniqueInUse (RLP const &_orig, byte except)
 
byte nibble (bytesConstRef _data, unsigned _i)
 
unsigned sharedNibbles (bytesConstRef _first, unsigned _beginFirst, unsigned _endFirst, bytesConstRef _second, unsigned _beginSecond, unsigned _endSecond)
 Interprets _first and _second as vectors of nibbles and returns the length of the longest common prefix of _first[_beginFirst..._endFirst] and _second[_beginSecond..._endSecond]. More...
 
std::ostream & operator<< (std::ostream &_out, NibbleSlice const &_m)
 
bool isLeaf (RLP const &_twoItem)
 
NibbleSlice keyOf (bytesConstRef _hpe)
 
NibbleSlice keyOf (RLP const &_twoItem)
 
std::string hexPrefixEncode (NibbleSlice _s, bool _leaf, int _begin=0, int _end=-1)
 
std::string hexPrefixEncode (NibbleSlice _s1, NibbleSlice _s2, bool _leaf)
 
template<class DB >
std::ostream & operator<< (std::ostream &_out, GenericTrieDB< DB > const &_db)
 
template<class Generic , class KeyType >
std::ostream & operator<< (std::ostream &_out, SpecificTrieDB< Generic, KeyType > const &_db)
 
void hash256aux (HexMap const &_s, HexMap::const_iterator _begin, HexMap::const_iterator _end, unsigned _preLen, RLPStream &_rlp)
 
void hash256rlp (HexMap const &_s, HexMap::const_iterator _begin, HexMap::const_iterator _end, unsigned _preLen, RLPStream &_rlp)
 
bytes rlp256 (BytesMap const &_s)
 
h256 hash256 (BytesMap const &_s)
 
h256 orderedTrieRoot (std::vector< bytes > const &_data)
 
h256 orderedTrieRoot (std::vector< bytesConstRef > const &_data)
 
template<class T , class U >
h256 trieRootOver (unsigned _itemCount, T const &_getKey, U const &_getValue)
 
template<class _T >
vector_ref< _T const > ref (_T const &_t)
 
template<class _T >
vector_ref< _T > ref (_T &_t)
 
template<class _T >
vector_ref< _T const > ref (std::vector< _T > const &_t)
 
template<class _T >
vector_ref< _T > ref (std::vector< _T > &_t)
 
bytes aesDecrypt (bytesConstRef _cipher, std::string const &_password, unsigned _rounds=2000, bytesConstRef _salt=bytesConstRef())
 
Public toPublic (Secret const &_secret)
 Convert a secret key into the public key equivalent. More...
 
Address toAddress (Public const &_public)
 Convert a public key to address. More...
 
Address toAddress (Secret const &_secret)
 Convert a secret key into address of public key equivalent. More...
 
Address toAddress (Address const &_from, u256 const &_nonce)
 
void encrypt (Public const &_k, bytesConstRef _plain, bytes &o_cipher)
 Encrypts plain text using Public key. More...
 
bool decrypt (Secret const &_k, bytesConstRef _cipher, bytes &o_plaintext)
 Decrypts cipher using Secret key. More...
 
void encryptSym (Secret const &_k, bytesConstRef _plain, bytes &o_cipher)
 Symmetric encryption. More...
 
bool decryptSym (Secret const &_k, bytesConstRef _cipher, bytes &o_plaintext)
 Symmetric decryption. More...
 
void encryptECIES (Public const &_k, bytesConstRef _plain, bytes &o_cipher)
 Encrypt payload using ECIES standard with AES128-CTR. More...
 
void encryptECIES (Public const &_k, bytesConstRef _sharedMacData, bytesConstRef _plain, bytes &o_cipher)
 Encrypt payload using ECIES standard with AES128-CTR. More...
 
bool decryptECIES (Secret const &_k, bytesConstRef _cipher, bytes &o_plaintext)
 Decrypt payload using ECIES standard with AES128-CTR. More...
 
bool decryptECIES (Secret const &_k, bytesConstRef _sharedMacData, bytesConstRef _cipher, bytes &o_plaintext)
 Decrypt payload using ECIES standard with AES128-CTR. More...
 
std::pair< bytes, h128encryptSymNoAuth (SecureFixedHash< 16 > const &_k, bytesConstRef _plain)
 Encrypts payload with random IV/ctr using AES128-CTR. More...
 
bytes encryptAES128CTR (bytesConstRef _k, h128 const &_iv, bytesConstRef _plain)
 Encrypts payload with specified IV/ctr using AES128-CTR. More...
 
bytesSec decryptAES128CTR (bytesConstRef _k, h128 const &_iv, bytesConstRef _cipher)
 Decrypts payload with specified IV/ctr using AES128-CTR. More...
 
bytes encryptSymNoAuth (SecureFixedHash< 16 > const &_k, h128 const &_iv, bytesConstRef _plain)
 Encrypts payload with specified IV/ctr using AES128-CTR. More...
 
bytes encryptSymNoAuth (SecureFixedHash< 32 > const &_k, h128 const &_iv, bytesConstRef _plain)
 
bytesSec decryptSymNoAuth (SecureFixedHash< 16 > const &_k, h128 const &_iv, bytesConstRef _cipher)
 Decrypts payload with specified IV/ctr using AES128-CTR. More...
 
bytesSec decryptSymNoAuth (SecureFixedHash< 32 > const &_k, h128 const &_iv, bytesConstRef _cipher)
 
Public recover (Signature const &_sig, h256 const &_hash)
 Recovers Public key from signed message hash. More...
 
Signature sign (Secret const &_k, h256 const &_hash)
 Returns siganture of message hash. More...
 
bool verify (Public const &_k, Signature const &_s, h256 const &_hash)
 Verify signature. More...
 
bytesSec pbkdf2 (std::string const &_pass, bytes const &_salt, unsigned _iterations, unsigned _dkLen=32)
 Derive key via PBKDF2. More...
 
bytesSec scrypt (std::string const &_pass, bytes const &_salt, uint64_t _n, uint32_t _r, uint32_t _p, unsigned _dkLen)
 Derive key via Scrypt. More...
 
std::string prettyU256 (u256 _n, bool _abridged=true)
 Convert u256 into user-readable string. Returns int/hex value of 64 bits int, hex of 160 bits FixedHash. As a fallback try to handle input as h256. More...
 
Public jsToPublic (std::string const &_s)
 Leniently convert string to Public (h512). Accepts integers, "0x" prefixing, non-exact length. More...
 
Secret jsToSecret (std::string const &_s)
 Leniently convert string to Secret (h256). Accepts integers, "0x" prefixing, non-exact length. More...
 
Address jsToAddress (std::string const &_s)
 Leniently convert string to Address (h160). Accepts integers, "0x" prefixing, non-exact length. More...
 
std::ostream & operator<< (std::ostream &_out, dev::p2p::NodeIPEndpoint const &_ep)
 Simple stream output for a NodeIPEndpoint. More...
 
Json::Value toJson (unordered_map< u256, u256 > const &_storage)
 
Json::Value toJson (map< h256, pair< u256, u256 >> const &_storage)
 
Json::Value toJson (Address const &_address)
 
Json::Value toJson (std::map< h256, std::pair< u256, u256 >> const &_storage)
 
Json::Value toJson (std::unordered_map< u256, u256 > const &_storage)
 
template<class T >
Json::Value toJson (std::vector< T > const &_es)
 
template<class T >
Json::Value toJson (std::unordered_set< T > const &_es)
 
template<class T >
Json::Value toJson (std::set< T > const &_es)
 

Variables

char const * Version = ETH_PROJECT_VERSION
 
const u256 Invalid256 = ~(u256)0
 
boost::random_device s_fixedHashEngine
 
int g_logVerbosity = 5
 The logging system's current verbosity. More...
 
std::function< void(std::string const &, char const *)> g_logPost = simpleDebugOut
 The current method that the logging system uses to output the log messages. Defaults to simpleDebugOut(). More...
 
h256 const EmptyTrie = sha3(rlp(""))
 
bytes RLPNull = rlp("")
 The empty string in RLP format. More...
 
bytes RLPEmptyList = rlpList()
 The empty list in RLP format. More...
 
h256 EmptySHA3 = sha3(bytesConstRef())
 
h256 EmptyListSHA3 = sha3(rlpList())
 
const h256 c_shaNull = sha3(rlp(""))
 
Address ZeroAddress = Address()
 The zero address. More...
 
const unsigned SensibleHttpThreads = 4
 
const unsigned SensibleHttpPort = 8545
 

Detailed Description

Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Originally by René Nyffenegger.

This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!

DEVified by Gav Wood.

Typedef Documentation

using dev::Address = typedef h160

An Ethereum address: 20 bytes.

This is not endian-specific; it's just a bunch of bytes.

Definition at line 62 of file Common.h.

using dev::Addresses = typedef h160s

A vector of Ethereum addresses.

Definition at line 68 of file Common.h.

using dev::AddressHash = typedef std::unordered_set<h160>

A hash set of Ethereum addresses.

Definition at line 71 of file Common.h.

using dev::bigint = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<>>

Definition at line 121 of file Common.h.

using dev::bytes = typedef std::vector<byte>

Definition at line 75 of file Common.h.

using dev::bytesConstRef = typedef vector_ref<byte const>

Definition at line 77 of file Common.h.

using dev::BytesMap = typedef std::map<bytes, bytes>

Definition at line 138 of file Common.h.

using dev::bytesRef = typedef vector_ref<byte>

Definition at line 76 of file Common.h.

using dev::bytesSec = typedef secure_vector<byte>

Definition at line 118 of file Common.h.

typedef boost::error_info< struct tag_comment, std::string > dev::errinfo_comment

Definition at line 78 of file Assertions.h.

using dev::errinfo_extraData = typedef boost::error_info<struct tag_extraData, bytes>

Definition at line 85 of file Exceptions.h.

using dev::errinfo_got = typedef boost::error_info<struct tag_got, bigint>

Definition at line 77 of file Exceptions.h.

using dev::errinfo_got_h256 = typedef boost::error_info<struct tag_get_h256, h256>

Definition at line 83 of file Exceptions.h.

using dev::errinfo_hash256 = typedef boost::error_info<struct tag_hash, h256>

Definition at line 81 of file Exceptions.h.

using dev::errinfo_invalidSymbol = typedef boost::error_info<struct tag_invalidSymbol, char>

Definition at line 73 of file Exceptions.h.

using dev::errinfo_max = typedef boost::error_info<struct tag_max, bigint>

Definition at line 79 of file Exceptions.h.

using dev::errinfo_min = typedef boost::error_info<struct tag_min, bigint>

Definition at line 78 of file Exceptions.h.

using dev::errinfo_required = typedef boost::error_info<struct tag_required, bigint>

Definition at line 76 of file Exceptions.h.

using dev::errinfo_required_h256 = typedef boost::error_info<struct tag_required_h256, h256>

Definition at line 82 of file Exceptions.h.

using dev::errinfo_wrongAddress = typedef boost::error_info<struct tag_address, std::string>

Definition at line 74 of file Exceptions.h.

using dev::Guard = typedef std::lock_guard<std::mutex>

Definition at line 41 of file Guards.h.

using dev::h1024 = typedef FixedHash<128>

Definition at line 337 of file FixedHash.h.

using dev::h128 = typedef FixedHash<16>

Definition at line 342 of file FixedHash.h.

using dev::h160 = typedef FixedHash<20>

Definition at line 341 of file FixedHash.h.

using dev::h160Hash = typedef std::unordered_set<h160>

Definition at line 350 of file FixedHash.h.

using dev::h160s = typedef std::vector<h160>

Definition at line 346 of file FixedHash.h.

using dev::h160Set = typedef std::set<h160>

Definition at line 348 of file FixedHash.h.

using dev::h2048 = typedef FixedHash<256>

Definition at line 336 of file FixedHash.h.

using dev::h256 = typedef FixedHash<32>

Definition at line 340 of file FixedHash.h.

using dev::h256Hash = typedef std::unordered_set<h256>

Definition at line 349 of file FixedHash.h.

using dev::h256s = typedef std::vector<h256>

Definition at line 345 of file FixedHash.h.

using dev::h256Set = typedef std::set<h256>

Definition at line 347 of file FixedHash.h.

using dev::h512 = typedef FixedHash<64>

Definition at line 339 of file FixedHash.h.

using dev::h512s = typedef std::vector<h512>

Definition at line 344 of file FixedHash.h.

using dev::h520 = typedef FixedHash<65>

Definition at line 338 of file FixedHash.h.

using dev::h64 = typedef FixedHash<8>

Definition at line 343 of file FixedHash.h.

Definition at line 84 of file Exceptions.h.

using dev::HexMap = typedef std::map<bytes, bytes>

Definition at line 140 of file Common.h.

Definition at line 32 of file IpcServer.h.

using dev::Mutex = typedef std::mutex

Definition at line 37 of file Guards.h.

using dev::Public = typedef h512

A public key: 64 bytes.

This is not endian-specific; it's just a bunch of bytes.

Definition at line 39 of file Common.h.

using dev::ReadGuard = typedef boost::shared_lock<boost::shared_mutex>

Definition at line 44 of file Guards.h.

using dev::RecursiveGuard = typedef std::lock_guard<std::recursive_mutex>

Definition at line 43 of file Guards.h.

using dev::RecursiveMutex = typedef std::recursive_mutex

Definition at line 38 of file Guards.h.

using dev::RequirementError = typedef boost::tuple<errinfo_required, errinfo_got>

Definition at line 80 of file Exceptions.h.

using dev::RLPs = typedef std::vector<RLP>

Definition at line 40 of file RLP.h.

using dev::s160 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<160, 160, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 128 of file Common.h.

using dev::s256 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 126 of file Common.h.

using dev::s512 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<512, 512, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 130 of file Common.h.

using dev::Secret = typedef SecureFixedHash<32>

Definition at line 35 of file Common.h.

using dev::Secrets = typedef std::vector<Secret>

A vector of secrets.

Definition at line 74 of file Common.h.

using dev::SharedMutex = typedef boost::shared_mutex

Definition at line 39 of file Guards.h.

using dev::Signature = typedef h520

A signature: 65 bytes: r: [0, 32), s: [32, 64), v: 64.

This is not endian-specific; it's just a bunch of bytes.

Definition at line 43 of file Common.h.

using dev::SpinGuard = typedef std::lock_guard<SpinLock>

Definition at line 82 of file Guards.h.

using dev::string32 = typedef std::array<char, 32>

Definition at line 150 of file Common.h.

using dev::StringHashMap = typedef std::unordered_map<std::string, std::string>

Definition at line 143 of file Common.h.

using dev::StringMap = typedef std::map<std::string, std::string>

Definition at line 137 of file Common.h.

using dev::strings = typedef std::vector<std::string>

Definition at line 147 of file Common.h.

template<class KeyType , class DB >
using dev::TrieDB = typedef SpecificTrieDB<GenericTrieDB<DB>, KeyType>

Definition at line 498 of file TrieDB.h.

using dev::u128 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 124 of file Common.h.

using dev::u160 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<160, 160, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 127 of file Common.h.

using dev::u160s = typedef std::vector<u160>

Definition at line 132 of file Common.h.

using dev::u160Set = typedef std::set<u160>

Definition at line 134 of file Common.h.

using dev::u256 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 125 of file Common.h.

using dev::u256HashMap = typedef std::unordered_map<u256, u256>

Definition at line 144 of file Common.h.

using dev::u256Map = typedef std::map<u256, u256>

Definition at line 139 of file Common.h.

using dev::u256s = typedef std::vector<u256>

Definition at line 131 of file Common.h.

using dev::u256Set = typedef std::set<u256>

Definition at line 133 of file Common.h.

using dev::u512 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<512, 512, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 129 of file Common.h.

using dev::u64 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<64, 64, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 123 of file Common.h.

using dev::u8 = typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<8, 8, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>

Definition at line 122 of file Common.h.

using dev::UniqueGuard = typedef std::unique_lock<std::mutex>

Definition at line 42 of file Guards.h.

using dev::UnsignedRange = typedef std::pair<unsigned, unsigned>

Definition at line 36 of file RangeMask.h.

using dev::UnsignedRanges = typedef std::vector<UnsignedRange>

Definition at line 37 of file RangeMask.h.

using dev::UpgradableGuard = typedef boost::upgrade_lock<boost::shared_mutex>

Definition at line 45 of file Guards.h.

using dev::UpgradeGuard = typedef boost::upgrade_to_unique_lock<boost::shared_mutex>

Definition at line 46 of file Guards.h.

using dev::WriteGuard = typedef boost::unique_lock<boost::shared_mutex>

Definition at line 47 of file Guards.h.

Enumeration Type Documentation

enum dev::HexPrefix
strong
Enumerator
DontAdd 
Add 

Definition at line 45 of file CommonData.h.

enum dev::IfRunning
strong
Enumerator
Fail 
Join 
Detach 

Definition at line 32 of file Worker.h.

enum dev::KDF
strong
Enumerator
PBKDF2_SHA256 
Scrypt 

Definition at line 33 of file SecretStore.h.

enum dev::LogTag
strong
Enumerator
None 
Url 
Error 
Special 

Definition at line 138 of file Log.h.

enum dev::OnFailed
strong
Enumerator
InterpretRaw 
Empty 
Throw 

Definition at line 68 of file CommonJS.h.

enum dev::Verification
strong
Enumerator
Skip 
Normal 

Definition at line 43 of file TrieDB.h.

enum dev::WhenError
strong
Enumerator
DontThrow 
Throw 

Definition at line 39 of file CommonData.h.

enum dev::WithExisting : int
strong
Enumerator
Trust 
Verify 
Rescue 
Kill 

Definition at line 310 of file Common.h.

enum dev::WorkerState
strong
Enumerator
Starting 
Started 
Stopping 
Stopped 
Killing 

Definition at line 39 of file Worker.h.

Enumerator
Active 
Deleting 
Deleted 

Definition at line 42 of file WebThree.h.

Function Documentation

bytes dev::aesDecrypt ( bytesConstRef  _cipher,
std::string const &  _password,
unsigned  _rounds = 2000,
bytesConstRef  _salt = bytesConstRef() 
)

Definition at line 34 of file AES.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::asBytes ( std::string const &  _b)
inline

Converts a string to a byte array containing the string's (byte) data.

Definition at line 92 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::asNibbles ( bytesConstRef const &  _s)

Definition at line 129 of file CommonData.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool dev::assertAux ( bool  _a,
char const *  _aStr,
unsigned  _line,
char const *  _file,
char const *  _func 
)
inline

Definition at line 44 of file Assertions.h.

template<class A , class B >
bool dev::assertEqualAux ( A const &  _a,
B const &  _b,
char const *  _aStr,
char const *  _bStr,
unsigned  _line,
char const *  _file,
char const *  _func 
)
inline

Definition at line 58 of file Assertions.h.

template<class _ExceptionType >
void dev::assertThrowAux ( bool  _condition,
::std::string const &  _errorDescription,
unsigned  _line,
char const *  _file,
char const *  _function 
)
inline

Definition at line 81 of file Assertions.h.

template<class _ExceptionType >
void dev::assertThrowAux ( void const *  _pointer,
::std::string const &  _errorDescription,
unsigned  _line,
char const *  _file,
char const *  _function 
)
inline

Definition at line 100 of file Assertions.h.

std::string dev::asString ( bytes const &  _b)
inline

Converts byte array to a string containing the same (binary) data.

Unless the byte array happens to contain ASCII data, this won't be printable.

Definition at line 79 of file CommonData.h.

std::string dev::asString ( bytesConstRef  _b)
inline

Converts byte array ref to a string containing the same (binary) data.

Unless the byte array happens to contain ASCII data, this won't be printable.

Definition at line 86 of file CommonData.h.

Here is the call graph for this function:

template<class T >
unsigned dev::bytesRequired ( T  _i)
inline

Determine bytes required to encode the given integer value.

Returns
0 if _i is zero.

Definition at line 205 of file CommonData.h.

Here is the caller graph for this function:

template<class T , class _U >
unsigned dev::commonPrefix ( T const &  _t,
_U const &  _u 
)

Definition at line 191 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class V >
bool dev::contains ( T const &  _t,
V const &  _v 
)

Definition at line 379 of file CommonData.h.

Here is the caller graph for this function:

bytes dev::contents ( std::string const &  _file)

Retrieve and returns the contents of the given file.

If the file doesn't exist or isn't readable, returns an empty container / bytes.

Here is the caller graph for this function:

bytesRef dev::contentsNew ( std::string const &  _file,
bytesRef  _dest = bytesRef() 
)

Retrieve and returns the allocated contents of the given file; if is given, don't allocate, use it directly.

If the file doesn't exist or isn't readable, returns bytesRef(). Don't forget to delete [] the returned value's data when finished.

bytesSec dev::contentsSec ( std::string const &  _file)

Secure variation.

Here is the caller graph for this function:

std::string dev::contentsString ( std::string const &  _file)

Retrieve and returns the contents of the given file as a std::string.

If the file doesn't exist or isn't readable, returns an empty container / bytes.

Here is the caller graph for this function:

bool dev::decrypt ( Secret const &  _k,
bytesConstRef  _cipher,
bytes o_plaintext 
)

Decrypts cipher using Secret key.

Definition at line 109 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytesSec dev::decryptAES128CTR ( bytesConstRef  _k,
h128 const &  _iv,
bytesConstRef  _cipher 
)

Decrypts payload with specified IV/ctr using AES128-CTR.

Definition at line 183 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool dev::decryptECIES ( Secret const &  _k,
bytesConstRef  _cipher,
bytes o_plaintext 
)

Decrypt payload using ECIES standard with AES128-CTR.

Definition at line 131 of file Common.cpp.

Here is the caller graph for this function:

bool dev::decryptECIES ( Secret const &  _k,
bytesConstRef  _sharedMacData,
bytesConstRef  _cipher,
bytes o_plaintext 
)

Decrypt payload using ECIES standard with AES128-CTR.

_sharedMacData is shared authenticated data.

Definition at line 136 of file Common.cpp.

Here is the call graph for this function:

bool dev::decryptSym ( Secret const &  _k,
bytesConstRef  _cipher,
bytes o_plaintext 
)

Symmetric decryption.

Definition at line 151 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytesSec dev::decryptSymNoAuth ( SecureFixedHash< 16 > const &  _k,
h128 const &  _iv,
bytesConstRef  _cipher 
)
inline

Decrypts payload with specified IV/ctr using AES128-CTR.

Definition at line 129 of file Common.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bytesSec dev::decryptSymNoAuth ( SecureFixedHash< 32 > const &  _k,
h128 const &  _iv,
bytesConstRef  _cipher 
)
inline

Definition at line 130 of file Common.h.

Here is the call graph for this function:

dev::DEV_SIMPLE_EXCEPTION ( BadHexCharacter  )
dev::DEV_SIMPLE_EXCEPTION ( NoNetworking  )
dev::DEV_SIMPLE_EXCEPTION ( NoUPnPDevice  )
dev::DEV_SIMPLE_EXCEPTION ( RootNotFound  )
dev::DEV_SIMPLE_EXCEPTION ( FileError  )
dev::DEV_SIMPLE_EXCEPTION ( Overflow  )
dev::DEV_SIMPLE_EXCEPTION ( FailedInvariant  )
dev::DEV_SIMPLE_EXCEPTION ( ValueTooLarge  )
dev::DEV_SIMPLE_EXCEPTION_RLP ( BadCast  )
dev::DEV_SIMPLE_EXCEPTION_RLP ( BadRLP  )
dev::DEV_SIMPLE_EXCEPTION_RLP ( OversizeRLP  )
dev::DEV_SIMPLE_EXCEPTION_RLP ( UndersizeRLP  )
template<class N >
N dev::diff ( N const &  _a,
N const &  _b 
)
inline
Returns
the absolute distance between _a and _b.

Definition at line 212 of file Common.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::encrypt ( Public const &  _k,
bytesConstRef  _plain,
bytes o_cipher 
)

Encrypts plain text using Public key.

Definition at line 102 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::encryptAES128CTR ( bytesConstRef  _k,
h128 const &  _iv,
bytesConstRef  _plain 
)

Encrypts payload with specified IV/ctr using AES128-CTR.

Definition at line 163 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::encryptECIES ( Public const &  _k,
bytesConstRef  _plain,
bytes o_cipher 
)

Encrypt payload using ECIES standard with AES128-CTR.

Definition at line 119 of file Common.cpp.

Here is the caller graph for this function:

void dev::encryptECIES ( Public const &  _k,
bytesConstRef  _sharedMacData,
bytesConstRef  _plain,
bytes o_cipher 
)

Encrypt payload using ECIES standard with AES128-CTR.

_sharedMacData is shared authenticated data.

Definition at line 124 of file Common.cpp.

Here is the call graph for this function:

void dev::encryptSym ( Secret const &  _k,
bytesConstRef  _plain,
bytes o_cipher 
)

Symmetric encryption.

Definition at line 145 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::pair< bytes, h128 > dev::encryptSymNoAuth ( SecureFixedHash< 16 > const &  _k,
bytesConstRef  _plain 
)

Encrypts payload with random IV/ctr using AES128-CTR.

Definition at line 157 of file Common.cpp.

Here is the caller graph for this function:

bytes dev::encryptSymNoAuth ( SecureFixedHash< 16 > const &  _k,
h128 const &  _iv,
bytesConstRef  _plain 
)
inline

Encrypts payload with specified IV/ctr using AES128-CTR.

Definition at line 125 of file Common.h.

Here is the call graph for this function:

bytes dev::encryptSymNoAuth ( SecureFixedHash< 32 > const &  _k,
h128 const &  _iv,
bytesConstRef  _plain 
)
inline

Definition at line 126 of file Common.h.

Here is the call graph for this function:

std::string dev::escaped ( std::string const &  _s,
bool  _all = true 
)

Escapes a string into the C-string representation.

_all if true will escape all characters, not just the unprintable ones.

Definition at line 60 of file CommonData.cpp.

Here is the caller graph for this function:

template<size_t n>
u256 dev::exp10 ( )
inline

Definition at line 189 of file Common.h.

template<>
u256 dev::exp10< 0 > ( )
inline

Definition at line 194 of file Common.h.

Here is the caller graph for this function:

template<size_t N>
FixedHash<N> dev::fromBase36 ( std::string const &  _h)
inline

Definition at line 54 of file Base64.h.

bytes dev::fromBase64 ( std::string const &  _in)

Here is the caller graph for this function:

template<class T , class _In >
T dev::fromBigEndian ( _In const &  _bytes)
inline

Converts a big-endian byte-stream represented on a templated collection to a templated integer value.

_In will typically be either std::string or bytes. T will typically by unsigned, u160, u256 or bigint.

Definition at line 124 of file CommonData.h.

Here is the caller graph for this function:

bytes dev::fromHex ( std::string const &  _s,
WhenError  _throw = WhenError::DontThrow 
)

Definition at line 99 of file CommonData.cpp.

Here is the caller graph for this function:

std::string dev::fromRaw ( h256  _n)

Convert h256 into user-readable string (by directly using std::string constructor). If it can't be interpreted as an ASCII string, empty string is returned.

Definition at line 81 of file CommonJS.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

h128 dev::fromUUID ( std::string const &  _uuid)

Definition at line 31 of file FixedHash.cpp.

Here is the caller graph for this function:

std::string dev::getDataDir ( std::string  _prefix = "ethereum")
Returns
the path for user data.

Here is the caller graph for this function:

std::string dev::getDefaultDataDir ( std::string  _prefix = "ethereum")
Returns
the default path for user data, ignoring the one set by setDataDir.

Here is the caller graph for this function:

string dev::getIpcPath ( )
Returns
the ipc path (default is DataDir)

Definition at line 56 of file FileSystem.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string dev::getPassword ( std::string const &  _prompt)

Requests the user to enter a password on the console.

Definition at line 135 of file CommonIO.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string dev::getThreadName ( )

Set the current thread's log name.

Definition at line 170 of file Log.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

h256 dev::hash256 ( BytesMap const &  _s)

Definition at line 174 of file TrieHash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::hash256aux ( HexMap const &  _s,
HexMap::const_iterator  _begin,
HexMap::const_iterator  _end,
unsigned  _preLen,
RLPStream _rlp 
)

Definition at line 140 of file TrieHash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::hash256rlp ( HexMap const &  _s,
HexMap::const_iterator  _begin,
HexMap::const_iterator  _end,
unsigned  _preLen,
RLPStream _rlp 
)

Definition at line 48 of file TrieHash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string dev::hexPrefixEncode ( bytes const &  _hexVector,
bool  _leaf,
int  _begin,
int  _end 
)

Definition at line 43 of file TrieCommon.cpp.

Here is the caller graph for this function:

std::string dev::hexPrefixEncode ( bytesConstRef  _data,
bool  _leaf,
int  _beginNibble,
int  _endNibble,
unsigned  _offset 
)

Definition at line 60 of file TrieCommon.cpp.

Here is the call graph for this function:

std::string dev::hexPrefixEncode ( bytesConstRef  _d1,
unsigned  _o1,
bytesConstRef  _d2,
unsigned  _o2,
bool  _leaf 
)

Definition at line 81 of file TrieCommon.cpp.

Here is the call graph for this function:

std::string dev::hexPrefixEncode ( NibbleSlice  _s,
bool  _leaf,
int  _begin = 0,
int  _end = -1 
)
inline

Definition at line 123 of file TrieCommon.h.

Here is the call graph for this function:

std::string dev::hexPrefixEncode ( NibbleSlice  _s1,
NibbleSlice  _s2,
bool  _leaf 
)
inline

Definition at line 128 of file TrieCommon.h.

Here is the call graph for this function:

std::string dev::inUnits ( bigint const &  _b,
strings const &  _units 
)

Converts given int to a string and appends one of a series of units according to its size.

Definition at line 72 of file Common.cpp.

Here is the caller graph for this function:

bool dev::isChannelVisible ( std::type_info const *  _ch,
bool  _default 
)

Definition at line 45 of file Log.cpp.

template<class Channel >
bool dev::isChannelVisible ( )

Definition at line 76 of file Log.h.

Here is the caller graph for this function:

bool dev::isHex ( std::string const &  _s)
noexcept
Returns
true if _s is a hex string.

Here is the caller graph for this function:

bool dev::isLeaf ( RLP const &  _twoItem)
inline

Definition at line 96 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Address dev::jsToAddress ( std::string const &  _s)
inline

Leniently convert string to Address (h160). Accepts integers, "0x" prefixing, non-exact length.

Definition at line 43 of file CommonJS.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::jsToBytes ( string const &  _s,
OnFailed  _f 
)

Definition at line 31 of file CommonJS.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::jsToBytes ( std::string const &  _s,
OnFailed  _f = OnFailed::Empty 
)

Convert string to byte array.

Input parameter is hex, optionally prefixed by "0x". Returns empty array if invalid input.

std::string dev::jsToDecimal ( std::string const &  _s)
inline

Definition at line 122 of file CommonJS.h.

Here is the call graph for this function:

template<unsigned N>
FixedHash<N> dev::jsToFixed ( std::string const &  _s)

Definition at line 84 of file CommonJS.h.

template<unsigned N>
int dev::jsToInt ( std::string const &  _s)
inline

Convert a string representation of a number to an int String can be a normal decimal number, or a hex prefixed by 0x or 0X, or an octal if prefixed by 0 Returns 0 in case of failure.

Definition at line 97 of file CommonJS.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Public dev::jsToPublic ( std::string const &  _s)
inline

Leniently convert string to Public (h512). Accepts integers, "0x" prefixing, non-exact length.

Definition at line 37 of file CommonJS.h.

Here is the caller graph for this function:

Secret dev::jsToSecret ( std::string const &  _s)
inline

Leniently convert string to Secret (h256). Accepts integers, "0x" prefixing, non-exact length.

Definition at line 40 of file CommonJS.h.

Here is the call graph for this function:

Here is the caller graph for this function:

u256 dev::jsToU256 ( std::string const &  _s)
inline

Definition at line 110 of file CommonJS.h.

Here is the call graph for this function:

Here is the caller graph for this function:

NibbleSlice dev::keyOf ( bytesConstRef  _hpe)
inline

Definition at line 103 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

NibbleSlice dev::keyOf ( RLP const &  _twoItem)
inline

Definition at line 113 of file TrieCommon.h.

Here is the call graph for this function:

template<class T , class U >
std::vector<T> dev::keysOf ( std::map< T, U > const &  _m)

Definition at line 341 of file CommonData.h.

Here is the caller graph for this function:

template<class T , class U >
std::vector<T> dev::keysOf ( std::unordered_map< T, U > const &  _m)

Definition at line 350 of file CommonData.h.

h160 dev::left160 ( h256 const &  _t)
inline

Convert the given value into h160 (160-bit unsigned integer) using the left 20 bytes.

Definition at line 361 of file FixedHash.h.

Here is the call graph for this function:

string dev::memDump ( bytes const &  _bytes,
unsigned  _width = 8,
bool  _html = false 
)

Nicely renders the given bytes to a string, optionally as HTML.

_bytes: bytes array to be rendered as string. _width of a bytes line.

Definition at line 37 of file CommonIO.cpp.

Here is the caller graph for this function:

byte dev::nibble ( bytesConstRef  _data,
unsigned  _i 
)
inline

Definition at line 30 of file TrieCommon.h.

Here is the caller graph for this function:

template<class T , class U >
std::set<T> dev::operator+ ( std::set< T _a,
U const &  _b 
)

Insert the contents of a container into a set.

Definition at line 280 of file CommonData.h.

template<class T , class U >
std::unordered_set<T> dev::operator+ ( std::unordered_set< T _a,
U const &  _b 
)

Insert the contents of a container into an unordered_set.

Definition at line 286 of file CommonData.h.

template<class T , class U >
std::vector<T> dev::operator+ ( std::vector< T _a,
U const &  _b 
)

Concatenate the contents of a container onto a vector.

Definition at line 292 of file CommonData.h.

template<class T >
std::vector<T> dev::operator+ ( std::vector< T > const &  _a,
std::vector< T > const &  _b 
)
inline

Concatenate two vectors of elements.

Definition at line 299 of file CommonData.h.

template<class T >
std::set<T> dev::operator+ ( std::set< T > const &  _a,
std::set< T > const &  _b 
)
inline

Merge two sets of elements.

Definition at line 316 of file CommonData.h.

template<class A , class B >
std::unordered_map<A, B> dev::operator+ ( std::unordered_map< A, B > const &  _x,
std::unordered_map< A, B > const &  _y 
)

Definition at line 331 of file CommonData.h.

Here is the call graph for this function:

template<class T >
std::vector<T>& dev::operator+= ( std::vector< typename std::enable_if< std::is_pod< T >::value, T >::type > &  _a,
std::vector< T > const &  _b 
)
inline

Concatenate two vectors of elements of POD types.

Definition at line 236 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
std::vector<T>& dev::operator+= ( std::vector< typename std::enable_if<!std::is_pod< T >::value, T >::type > &  _a,
std::vector< T > const &  _b 
)
inline

Concatenate two vectors of elements.

Definition at line 247 of file CommonData.h.

template<class T , class U >
std::set<T>& dev::operator+= ( std::set< T > &  _a,
U const &  _b 
)

Insert the contents of a container into a set.

Definition at line 256 of file CommonData.h.

template<class T , class U >
std::unordered_set<T>& dev::operator+= ( std::unordered_set< T > &  _a,
U const &  _b 
)

Insert the contents of a container into an unordered_set.

Definition at line 264 of file CommonData.h.

template<class T , class U >
std::vector<T>& dev::operator+= ( std::vector< T > &  _a,
U const &  _b 
)

Concatenate the contents of a container onto a vector.

Definition at line 272 of file CommonData.h.

template<class T >
std::set<T>& dev::operator+= ( std::set< T > &  _a,
std::set< T > const &  _b 
)
inline

Merge two sets of elements.

Definition at line 307 of file CommonData.h.

template<class A , class B >
std::unordered_map<A, B>& dev::operator+= ( std::unordered_map< A, B > &  _x,
std::unordered_map< A, B > const &  _y 
)

Definition at line 323 of file CommonData.h.

std::ostream& dev::operator<< ( std::ostream &  _out,
bytes const &  _e 
)
inline

Definition at line 80 of file CommonIO.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
std::ostream & dev::operator<< ( std::ostream &  _out,
std::vector< T > const &  _e 
)
inline

Definition at line 132 of file CommonIO.h.

Here is the call graph for this function:

template<class T , std::size_t Z>
std::ostream & dev::operator<< ( std::ostream &  _out,
std::array< T, Z > const &  _e 
)
inline

Definition at line 148 of file CommonIO.h.

Here is the call graph for this function:

template<class T , class U >
std::ostream & dev::operator<< ( std::ostream &  _out,
std::pair< T, U > const &  _e 
)
inline

Definition at line 171 of file CommonIO.h.

Here is the call graph for this function:

template<class T >
std::ostream & dev::operator<< ( std::ostream &  _out,
std::list< T > const &  _e 
)
inline

Definition at line 163 of file CommonIO.h.

Here is the call graph for this function:

template<class T1 , class T2 , class T3 >
std::ostream & dev::operator<< ( std::ostream &  _out,
std::tuple< T1, T2, T3 > const &  _e 
)
inline

Definition at line 179 of file CommonIO.h.

Here is the call graph for this function:

template<class T , class U >
std::ostream & dev::operator<< ( std::ostream &  _out,
std::map< T, U > const &  _e 
)
inline

Definition at line 191 of file CommonIO.h.

Here is the call graph for this function:

std::ostream& dev::operator<< ( std::ostream &  _out,
MemoryDB const &  _m 
)
inline

Definition at line 87 of file MemoryDB.h.

Here is the call graph for this function:

template<class T , class U >
std::ostream & dev::operator<< ( std::ostream &  _out,
std::unordered_map< T, U > const &  _e 
)
inline

Definition at line 203 of file CommonIO.h.

Here is the call graph for this function:

template<class T , class U >
std::ostream& dev::operator<< ( std::ostream &  _out,
std::set< T, U > const &  _e 
)
inline
template<class T , class U >
std::ostream& dev::operator<< ( std::ostream &  _out,
std::unordered_set< T, U > const &  _e 
)
inline
std::ostream& dev::operator<< ( std::ostream &  _out,
NibbleSlice const &  _m 
)
inline

Definition at line 89 of file TrieCommon.h.

Here is the call graph for this function:

template<class T , class U >
std::ostream & dev::operator<< ( std::ostream &  _out,
std::multimap< T, U > const &  _e 
)
inline

Definition at line 257 of file CommonIO.h.

Here is the call graph for this function:

template<class _S , class _T >
_S & dev::operator<< ( _S &  _out,
std::shared_ptr< _T > const &  _p 
)

Definition at line 259 of file CommonIO.h.

template<class T >
std::ostream& dev::operator<< ( std::ostream &  _out,
std::set< T > const &  _e 
)
inline

Definition at line 215 of file CommonIO.h.

Here is the call graph for this function:

template<class T >
std::ostream& dev::operator<< ( std::ostream &  _out,
RangeMask< T > const &  _r 
)
inline

Definition at line 224 of file RangeMask.h.

Here is the call graph for this function:

template<class T >
std::ostream& dev::operator<< ( std::ostream &  _out,
std::unordered_set< T > const &  _e 
)
inline

Definition at line 227 of file CommonIO.h.

Here is the call graph for this function:

template<class T >
std::ostream& dev::operator<< ( std::ostream &  _out,
std::multiset< T > const &  _e 
)
inline

Definition at line 239 of file CommonIO.h.

Here is the call graph for this function:

std::ostream & dev::operator<< ( std::ostream &  _out,
dev::p2p::NodeIPEndpoint const &  _ep 
)

Simple stream output for a NodeIPEndpoint.

Definition at line 258 of file Common.cpp.

template<class DB >
std::ostream& dev::operator<< ( std::ostream &  _out,
GenericTrieDB< DB > const &  _db 
)

Definition at line 309 of file TrieDB.h.

Here is the call graph for this function:

template<unsigned N>
std::ostream& dev::operator<< ( std::ostream &  _out,
FixedHash< N > const &  _h 
)
inline

Stream I/O for the FixedHash class.

Definition at line 318 of file FixedHash.h.

template<unsigned N>
std::ostream& dev::operator<< ( std::ostream &  _out,
SecureFixedHash< N > const &  _h 
)
inline

Stream I/O for the SecureFixedHash class.

Definition at line 329 of file FixedHash.h.

template<class Generic , class KeyType >
std::ostream& dev::operator<< ( std::ostream &  _out,
SpecificTrieDB< Generic, KeyType > const &  _db 
)

Definition at line 359 of file TrieDB.h.

Here is the call graph for this function:

std::ostream & dev::operator<< ( std::ostream &  _out,
dev::RLP const &  _d 
)

Human readable version of RLP.

Definition at line 374 of file RLP.cpp.

h256 dev::orderedTrieRoot ( std::vector< bytes > const &  _data)

Definition at line 179 of file TrieHash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

h256 dev::orderedTrieRoot ( std::vector< bytesConstRef > const &  _data)

Definition at line 188 of file TrieHash.cpp.

Here is the call graph for this function:

bytes dev::padded ( bytes  _b,
unsigned  _l 
)

Add '0' on, or remove items from, the front of _b until it is of length _l.

Definition at line 47 of file CommonJS.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::paddedRight ( bytes  _b,
unsigned  _l 
)

Add '0' on, or remove items from, the back of _b until it is of length _l.

Definition at line 54 of file CommonJS.cpp.

Here is the caller graph for this function:

bytesSec dev::pbkdf2 ( std::string const &  _pass,
bytes const &  _salt,
unsigned  _iterations,
unsigned  _dkLen = 32 
)

Derive key via PBKDF2.

Here is the caller graph for this function:

std::string dev::prettyU256 ( u256  _n,
bool  _abridged 
)

Convert u256 into user-readable string. Returns int/hex value of 64 bits int, hex of 160 bits FixedHash. As a fallback try to handle input as h256.

Definition at line 29 of file CommonJS.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class _U >
void dev::pushFront ( T _t,
_U  _e 
)

Pushes an element on to the front of a collection.

Only works for POD element types.

Definition at line 226 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string dev::randomWord ( )

Creates a random, printable, word.

Definition at line 88 of file CommonData.cpp.

Here is the caller graph for this function:

Public dev::recover ( Signature const &  _sig,
h256 const &  _hash 
)

Recovers Public key from signed message hash.

Definition at line 203 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class _T >
vector_ref<_T const> dev::ref ( _T const &  _t)

Definition at line 115 of file vector_ref.h.

Here is the caller graph for this function:

template<class _T >
vector_ref<_T> dev::ref ( _T &  _t)

Definition at line 116 of file vector_ref.h.

template<class _T >
vector_ref<_T const> dev::ref ( std::vector< _T > const &  _t)

Definition at line 117 of file vector_ref.h.

template<class _T >
vector_ref<_T> dev::ref ( std::vector< _T > &  _t)

Definition at line 118 of file vector_ref.h.

h160 dev::right160 ( h256 const &  _t)
inline

Convert the given value into h160 (160-bit unsigned integer) using the right 20 bytes.

Definition at line 353 of file FixedHash.h.

Here is the call graph for this function:

Here is the caller graph for this function:

h160 dev::ripemd160 ( bytesConstRef  _input)

Definition at line 400 of file Hash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class _T >
bytes dev::rlp ( _T  _t)

Export a single item in RLP format, returning a byte array.

Definition at line 467 of file RLP.h.

Here is the caller graph for this function:

bytes dev::rlp256 ( BytesMap const &  _s)

Definition at line 161 of file TrieHash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::rlpList ( )
inline

Export a list of items in RLP format, returning a byte array.

Definition at line 470 of file RLP.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class... _Ts>
bytes dev::rlpList ( _Ts...  _ts)

Definition at line 471 of file RLP.h.

Here is the call graph for this function:

template<class _T >
void dev::rlpListAux ( RLPStream _out,
_T  _t 
)

Definition at line 463 of file RLP.h.

Here is the caller graph for this function:

template<class _T , class... _Ts>
void dev::rlpListAux ( RLPStream _out,
_T  _t,
_Ts...  _ts 
)

Definition at line 464 of file RLP.h.

Here is the call graph for this function:

u256 dev::s2u ( s256  _u)
inline
Returns
the two's complement signed representation of the signed number _u.

Definition at line 169 of file Common.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bytesSec dev::scrypt ( std::string const &  _pass,
bytes const &  _salt,
uint64_t  _n,
uint32_t  _r,
uint32_t  _p,
unsigned  _dkLen 
)

Derive key via Scrypt.

Definition at line 280 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::setDataDir ( std::string const &  _dir)

Sets the data dir for the default ("ethereum") prefix.

Here is the caller graph for this function:

void dev::setIpcPath ( std::string const &  _ipcPath)

Sets the ipc socket dir.

Here is the caller graph for this function:

void dev::setThreadName ( std::string const &  _n)

Set the current thread's log name.

It appears that there is not currently any cross-platform way of setting thread names either in Boost or in the C++11 runtime libraries. What is more, the API for 'pthread_setname_np' is not even consistent across platforms which implement it.

A proposal to add such functionality on the Boost mailing list, which I assume never happened, but which I should follow-up and ask about. http://boost.2283326.n4.nabble.com/Adding-an-option-to-set-the-name-of-a-boost-thread-td4638283.html

man page for 'pthread_setname_np', including this crucial snippet of information ... "These functions are nonstandard GNU extensions." http://man7.org/linux/man-pages/man3/pthread_setname_np.3.html

Stack Overflow "Can I set the name of a thread in pthreads / linux?" which includes useful information on the minor API differences between Linux, BSD and OS X. http://stackoverflow.com/questions/2369738/can-i-set-the-name-of-a-thread-in-pthreads-linux/7989973#7989973

musl mailng list posting "pthread set name on MIPs" which includes the information that musl doesn't currently implement 'pthread_setname_np' https://marc.info/?l=musl&m=146171729013062&w=1

Here is the caller graph for this function:

h256 dev::sha256 ( bytesConstRef  _input)

Definition at line 33 of file Hash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

h256 dev::sha3 ( bytesConstRef  _input)
inline

Calculate SHA3-256 hash of the given input, returning as a 256-bit hash.

Definition at line 40 of file SHA3.h.

Here is the call graph for this function:

h256 dev::sha3 ( bytes const &  _input)
inline

Calculate SHA3-256 hash of the given input, returning as a 256-bit hash.

Definition at line 44 of file SHA3.h.

Here is the call graph for this function:

h256 dev::sha3 ( std::string const &  _input)
inline

Calculate SHA3-256 hash of the given input (presented as a binary-filled string), returning as a 256-bit hash.

Definition at line 48 of file SHA3.h.

Here is the call graph for this function:

template<unsigned N>
h256 dev::sha3 ( FixedHash< N > const &  _input)
inline

Calculate SHA3-256 hash of the given input (presented as a FixedHash), returns a 256-bit hash.

Definition at line 52 of file SHA3.h.

Here is the call graph for this function:

SecureFixedHash<32> dev::sha3 ( bytesSec const &  _input)
inline

Fully secure variants are equivalent for sha3 and sha3Secure.

Definition at line 56 of file SHA3.h.

Here is the call graph for this function:

template<unsigned N>
SecureFixedHash<32> dev::sha3 ( SecureFixedHash< N > const &  _input)
inline

Definition at line 58 of file SHA3.h.

Here is the call graph for this function:

std::string dev::sha3 ( std::string const &  _input,
bool  _isNibbles 
)
inline

Calculate SHA3-256 hash of the given input, possibly interpreting it as nibbles, and return the hash as a string filled with binary data.

Definition at line 62 of file SHA3.h.

Here is the call graph for this function:

bool dev::sha3 ( bytesConstRef  _input,
bytesRef  o_output 
)

Calculate SHA3-256 hash of the given input and load it into the given output.

Returns
false if o_output.size() != 32.

Definition at line 214 of file SHA3.cpp.

Here is the call graph for this function:

void dev::sha3mac ( bytesConstRef  _secret,
bytesConstRef  _plain,
bytesRef  _output 
)
inline

Calculate SHA3-256 MAC.

Definition at line 65 of file SHA3.h.

Here is the call graph for this function:

Here is the caller graph for this function:

SecureFixedHash<32> dev::sha3Secure ( bytesConstRef  _input)
inline

Definition at line 41 of file SHA3.h.

Here is the call graph for this function:

Here is the caller graph for this function:

SecureFixedHash<32> dev::sha3Secure ( bytes const &  _input)
inline

Definition at line 45 of file SHA3.h.

Here is the call graph for this function:

SecureFixedHash<32> dev::sha3Secure ( std::string const &  _input)
inline

Definition at line 49 of file SHA3.h.

Here is the call graph for this function:

template<unsigned N>
SecureFixedHash<32> dev::sha3Secure ( FixedHash< N > const &  _input)
inline

Definition at line 53 of file SHA3.h.

Here is the call graph for this function:

SecureFixedHash<32> dev::sha3Secure ( bytesSec const &  _input)
inline

Definition at line 57 of file SHA3.h.

Here is the call graph for this function:

template<unsigned N>
SecureFixedHash<32> dev::sha3Secure ( SecureFixedHash< N > const &  _input)
inline

Definition at line 59 of file SHA3.h.

Here is the call graph for this function:

unsigned dev::sharedNibbles ( bytesConstRef  _first,
unsigned  _beginFirst,
unsigned  _endFirst,
bytesConstRef  _second,
unsigned  _beginSecond,
unsigned  _endSecond 
)
inline

Interprets _first and _second as vectors of nibbles and returns the length of the longest common prefix of _first[_beginFirst..._endFirst] and _second[_beginSecond..._endSecond].

Definition at line 37 of file TrieCommon.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Signature dev::sign ( Secret const &  _k,
h256 const &  _hash 
)

Returns siganture of message hash.

Definition at line 233 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::simpleDebugOut ( std::string const &  _s,
char const *   
)

A simple log-output function that prints log messages to stdout.

Definition at line 199 of file Log.cpp.

Here is the caller graph for this function:

template<class S , class T >
S& dev::streamout ( S _out,
std::vector< T > const &  _e 
)
inline

Definition at line 119 of file CommonIO.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class S , class T , std::size_t Z>
S& dev::streamout ( S _out,
std::array< T, Z > const &  _e 
)
inline

Definition at line 135 of file CommonIO.h.

Here is the call graph for this function:

template<class S , class T >
S& dev::streamout ( S _out,
std::list< T > const &  _e 
)
inline

Definition at line 151 of file CommonIO.h.

template<class S , class T , class U >
S& dev::streamout ( S _out,
std::pair< T, U > const &  _e 
)
inline

Definition at line 166 of file CommonIO.h.

template<class S , class T1 , class T2 , class T3 >
S& dev::streamout ( S _out,
std::tuple< T1, T2, T3 > const &  _t 
)
inline

Definition at line 174 of file CommonIO.h.

template<class S , class T , class U >
S& dev::streamout ( S _out,
std::map< T, U > const &  _v 
)

Definition at line 182 of file CommonIO.h.

template<class S , class T , class U >
S& dev::streamout ( S _out,
std::unordered_map< T, U > const &  _v 
)

Definition at line 194 of file CommonIO.h.

template<class S , class T >
S& dev::streamout ( S _out,
std::set< T > const &  _v 
)

Definition at line 206 of file CommonIO.h.

template<class S , class T >
S& dev::streamout ( S _out,
std::unordered_set< T > const &  _v 
)

Definition at line 218 of file CommonIO.h.

template<class S , class T >
S& dev::streamout ( S _out,
std::multiset< T > const &  _v 
)

Definition at line 230 of file CommonIO.h.

template<class S , class T , class U >
S& dev::streamout ( S _out,
std::multimap< T, U > const &  _v 
)

Definition at line 242 of file CommonIO.h.

Address dev::toAddress ( Public const &  _public)

Convert a public key to address.

Definition at line 87 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Address dev::toAddress ( Secret const &  _secret)

Convert a secret key into address of public key equivalent.

Returns
0 if it's not a valid secret key.

Definition at line 92 of file Common.cpp.

Here is the call graph for this function:

Address dev::toAddress ( Address const &  _from,
u256 const &  _nonce 
)

Definition at line 97 of file Common.cpp.

Here is the call graph for this function:

template<size_t N>
std::string dev::toBase36 ( FixedHash< N > const &  _h)
inline

Definition at line 41 of file Base64.h.

string dev::toBase64 ( bytesConstRef  _in)

Definition at line 49 of file Base64.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class Out >
void dev::toBigEndian ( T  _val,
Out &  o_out 
)
inline

Converts a templated integer value to the big-endian byte-stream represented on a templated collection.

The size of the collection object will be unchanged. If it is too small, it will not represent the value properly, if too big then the additional elements will be zeroed out. Out will typically be either std::string or bytes. T will typically by unsigned, u160, u256 or bigint.

Definition at line 110 of file CommonData.h.

Here is the caller graph for this function:

bytes dev::toBigEndian ( u256  _val)
inline

Definition at line 135 of file CommonData.h.

Here is the call graph for this function:

bytes dev::toBigEndian ( u160  _val)
inline

Definition at line 136 of file CommonData.h.

Here is the call graph for this function:

std::string dev::toBigEndianString ( u256  _val)
inline

Convenience functions for toBigEndian.

Definition at line 133 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string dev::toBigEndianString ( u160  _val)
inline

Definition at line 134 of file CommonData.h.

Here is the call graph for this function:

template<class T >
bytes dev::toCompactBigEndian ( T  _val,
unsigned  _min = 0 
)
inline

Convenience function for toBigEndian.

Returns
a byte array just big enough to represent _val.

Definition at line 141 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::toCompactBigEndian ( byte  _val,
unsigned  _min = 0 
)
inline

Definition at line 150 of file CommonData.h.

template<class T >
std::string dev::toCompactBigEndianString ( T  _val,
unsigned  _min = 0 
)
inline

Convenience function for toBigEndian.

Returns
a string just big enough to represent _val.

Definition at line 158 of file CommonData.h.

Here is the call graph for this function:

std::string dev::toCompactHex ( u256  val,
HexPrefix  prefix = HexPrefix::DontAdd,
unsigned  _min = 0 
)
inline

Definition at line 175 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
std::string dev::toHex ( T const &  _data,
int  _w = 2,
HexPrefix  _prefix = HexPrefix::DontAdd 
)

Definition at line 54 of file CommonData.h.

Here is the call graph for this function:

std::string dev::toHex ( u256  val,
HexPrefix  prefix = HexPrefix::DontAdd 
)
inline

Convenience function for conversion of a u256 to hex.

Definition at line 169 of file CommonData.h.

Here is the call graph for this function:

template<unsigned S>
std::string dev::toJS ( FixedHash< S > const &  _h)

Definition at line 34 of file CommonJS.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned N>
std::string dev::toJS ( boost::multiprecision::number< boost::multiprecision::cpp_int_backend< N, N, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> const &  _n)

Definition at line 39 of file CommonJS.h.

Here is the call graph for this function:

std::string dev::toJS ( bytes const &  _n,
std::size_t  _padding = 0 
)
inline

Definition at line 47 of file CommonJS.h.

Here is the call graph for this function:

template<unsigned T>
std::string dev::toJS ( SecureFixedHash< T > const &  _i)

Definition at line 54 of file CommonJS.h.

Here is the call graph for this function:

template<typename T >
std::string dev::toJS ( T const &  _i)

Definition at line 61 of file CommonJS.h.

Json::Value dev::toJson ( std::map< h256, std::pair< u256, u256 >> const &  _storage)
Json::Value dev::toJson ( std::unordered_map< u256, u256 > const &  _storage)
Json::Value dev::toJson ( unordered_map< u256, u256 > const &  _storage)

Definition at line 41 of file JsonHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Json::Value dev::toJson ( map< h256, pair< u256, u256 >> const &  _storage)

Definition at line 49 of file JsonHelper.cpp.

Here is the call graph for this function:

Json::Value dev::toJson ( Address const &  _address)

Definition at line 57 of file JsonHelper.cpp.

Here is the call graph for this function:

template<class T >
Json::Value dev::toJson ( std::vector< T > const &  _es)

Definition at line 98 of file JsonHelper.h.

Here is the call graph for this function:

template<class T >
Json::Value dev::toJson ( std::unordered_set< T > const &  _es)

Definition at line 107 of file JsonHelper.h.

Here is the call graph for this function:

template<class T >
Json::Value dev::toJson ( std::set< T > const &  _es)

Definition at line 116 of file JsonHelper.h.

Here is the call graph for this function:

unsigned int dev::toLog2 ( u256  _x)
inline
Returns
the smallest n >= 0 such that (1 << n) >= _x

Definition at line 182 of file Common.h.

Public dev::toPublic ( Secret const &  _secret)

Convert a secret key into the public key equivalent.

Definition at line 67 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
std::string dev::toString ( std::chrono::time_point< T > const &  _e,
std::string  _format = "%F %T" 
)
inline

Definition at line 96 of file CommonIO.h.

template<class _T >
std::string dev::toString ( _T const &  _t)

Converts arbitrary value to string representation using std::stringstream.

Definition at line 265 of file CommonIO.h.

std::string dev::toString ( string32 const &  _s)

Make normal string from fixed-length string.

Definition at line 141 of file CommonData.cpp.

std::string dev::toString ( h256s const &  _bs)
inline

Definition at line 372 of file FixedHash.h.

template<typename T >
uint64_t dev::toUint64 ( T  _u)

Converts given multiprecision number to standard number type.

Definition at line 200 of file Common.h.

Here is the caller graph for this function:

template<typename T >
uint8_t dev::toUint8 ( T  _u)

Definition at line 205 of file Common.h.

Here is the caller graph for this function:

std::string dev::toUUID ( h128 const &  _uuid)

Definition at line 43 of file FixedHash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class U >
h256 dev::trieRootOver ( unsigned  _itemCount,
T const &  _getKey,
U const &  _getValue 
)
inline

Definition at line 35 of file TrieHash.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void dev::trimFront ( T _t,
unsigned  _elements 
)

Trims a given number of elements from the front of a collection.

Only works for POD element types.

Definition at line 216 of file CommonData.h.

Here is the call graph for this function:

Here is the caller graph for this function:

s256 dev::u2s ( u256  _u)
inline

Interprets _u as a two's complement signed number and returns the resulting s256.

Definition at line 159 of file Common.h.

Here is the caller graph for this function:

byte dev::uniqueInUse ( RLP const &  _orig,
byte  except 
)

Definition at line 113 of file TrieCommon.cpp.

Here is the caller graph for this function:

bytes dev::unpadded ( bytes  _b)

Removing all trailing '0'. Returns empty array if input contains only '0' char.

Definition at line 60 of file CommonJS.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytes dev::unpadLeft ( bytes  _b)

Remove all 0 byte on the head of _s.

Definition at line 67 of file CommonJS.cpp.

Here is the caller graph for this function:

uint64_t dev::utcTime ( )

Get the current time in seconds since the epoch in UTC.

Definition at line 64 of file Common.cpp.

Here is the caller graph for this function:

template<class T , class U >
std::vector<U> dev::valuesOf ( std::map< T, U > const &  _m)

Definition at line 359 of file CommonData.h.

Here is the caller graph for this function:

template<class T , class U >
std::vector<U> dev::valuesOf ( std::unordered_map< T, U > const &  _m)

Definition at line 369 of file CommonData.h.

bool dev::verify ( Public const &  _k,
Signature const &  _s,
h256 const &  _hash 
)

Verify signature.

Definition at line 255 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::writeFile ( std::string const &  _file,
bytesConstRef  _data,
bool  _writeDeleteRename = false 
)

Write the given binary data into the given file, replacing the file if it pre-exists.

Throws exception on error.

Parameters
_writeDeleteRenameuseful not to lose any data: If set, first writes to another file in the same directory and then moves that file.

Definition at line 107 of file CommonIO.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::writeFile ( std::string const &  _file,
bytes const &  _data,
bool  _writeDeleteRename = false 
)
inline

Write the given binary data into the given file, replacing the file if it pre-exists.

Definition at line 67 of file CommonIO.h.

Here is the call graph for this function:

void dev::writeFile ( std::string const &  _file,
std::string const &  _data,
bool  _writeDeleteRename = false 
)
inline

Definition at line 68 of file CommonIO.h.

Here is the call graph for this function:

Variable Documentation

h256 const dev::c_shaNull = sha3(rlp(""))

Definition at line 28 of file TrieDB.cpp.

h256 dev::EmptyListSHA3 = sha3(rlpList())

Definition at line 36 of file SHA3.cpp.

h256 dev::EmptySHA3 = sha3(bytesConstRef())

Definition at line 35 of file SHA3.cpp.

const h256 dev::EmptyTrie = sha3(rlp(""))

Definition at line 33 of file OverlayDB.cpp.

std::function< void(std::string const &, char const *)> dev::g_logPost = simpleDebugOut

The current method that the logging system uses to output the log messages. Defaults to simpleDebugOut().

Definition at line 215 of file Log.cpp.

int dev::g_logVerbosity = 5

The logging system's current verbosity.

Definition at line 37 of file Log.cpp.

const u256 dev::Invalid256 = ~(u256)0

Definition at line 38 of file Common.cpp.

bytes dev::RLPEmptyList = rlpList()

The empty list in RLP format.

Definition at line 27 of file RLP.cpp.

bytes dev::RLPNull = rlp("")

The empty string in RLP format.

Definition at line 26 of file RLP.cpp.

boost::random_device dev::s_fixedHashEngine

Definition at line 29 of file FixedHash.cpp.

const unsigned dev::SensibleHttpPort = 8545

Definition at line 49 of file Eth.cpp.

const unsigned dev::SensibleHttpThreads = 4

Definition at line 47 of file Eth.cpp.

char const * dev::Version = ETH_PROJECT_VERSION

Definition at line 36 of file Common.cpp.

Address dev::ZeroAddress = Address()

The zero address.

Definition at line 65 of file Common.cpp.