Skip to content

Instantly share code, notes, and snippets.

@firatsarlar
Created July 13, 2018 06:23
Show Gist options
  • Save firatsarlar/1e92d0ab585cb6a262980c93b04596cd to your computer and use it in GitHub Desktop.
Save firatsarlar/1e92d0ab585cb6a262980c93b04596cd to your computer and use it in GitHub Desktop.
#include <stdint.h>
#include <string>
#include <iomanip>
#include <jansson.h>
void tata8() {
string sk_cd_h80_dhash = "[ \
\"0x5803b44e\", \"0x6afaf87f\", \"0xf021089f\", \"0xf2b01571\", \"0x9059037f\", \"0x07af3fd0\", \"0xca78dc01\", \"0xb603141b\", \"0xd863013c\", \
\"0xaf2f38bb\", \"0x7befd0d9\", \"0x0e78d0c4\", \"0xe216e6cb\", \"0x57629494\", \"0xadc9b33f\", \"0x732559d7\", \"0x65755a5b\", \
\"0x9883b7fd\", \"0x70a49ecf\", \"0x795e41fa\", \"0x767630b1\", \"0xd09b7749\", \"0x48bb9913\", \"0x83a878cd\", \"0x14ebd014\", \
\"0x411425c1\", \"0xb8ca65db\", \"0x7f58351c\", \"0x12e2bbdd\", \"0x9fe5fa6c\", \"0xfbcd262f\", \"0x6cf31e38\", \"0x20da65f8\", \
\"0xb1c99a97\", \"0x41d18a51\", \"0x1f9bdeb7\", \"0x41208ceb\", \"0x8ba98638\", \"0xae0ac717\", \"0x78849f6d\", \"0x1260e7dd\", \
\"0x8062463b\", \"0xc8a4d2a9\", \"0x361f9cd1\", \"0xe598ad97\", \"0x9da37ee9\", \"0xc7f3c863\", \"0x6eb870ee\", \"0xec694103\", \
\"0xe1ce60d3\", \"0xd205cd60\", \"0x5bd1191e\", \"0x8c11ad92\", \"0x0fe56f12\", \"0x4f69fb2d\", \"0x73695a66\", \"0xce439307\", \
\"0x998309a2\", \"0x3fcb3f8b\", \"0x6f71839b\", \"0xd20eb8f3\", \"0x94af3109\", \"0x2c673911\", \"0x98fa70fc\" ]";
json_t *root, *params;
json_error_t err;
uint32_t dh[64] = { 0 };
root = JSON_LOADS(sk_cd_h80_dhash.c_str(), &err);
for (int i = 0; i < json_array_size(root); i++)
{
//json_t *data;
dh[i] = std::stoul(json_string_value(json_array_get(root, i)), nullptr, 16);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment