Fabcoin Core  0.16.2
P2P Digital Currency
Web3.cpp
Go to the documentation of this file.
1 #include <libdevcore/SHA3.h>
2 #include <libethcore/CommonJS.h>
3 #include "Web3.h"
4 
5 using namespace std;
6 using namespace dev;
7 
8 std::string rpc::Web3::web3_sha3(std::string const& _param1)
9 {
10  return toJS(sha3(jsToBytes(_param1)));
11 }
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
std::hash for asio::adress
Definition: Common.h:323
std::string toJS(FixedHash< S > const &_h)
Definition: CommonJS.h:34
bytes jsToBytes(string const &_s, OnFailed _f)
Definition: CommonJS.cpp:31
bool sha3(bytesConstRef _input, bytesRef o_output)
Calculate SHA3-256 hash of the given input and load it into the given output.
Definition: SHA3.cpp:214