Blockchain and sha256 [9], hello hash and 3n + 1 conjecture

void hex_printf(unsigned char (*hash)[32]) { // fixed 32 bytes
::printf( “0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x”,
    (*hash)[0], (*hash)[1], (*hash)[2], (*hash)[3], (*hash)[4], (*hash)[5], (*hash)[6], (*hash)[7],
    (*hash)[8], (*hash)[9], (*hash)[10], (*hash)[11], (*hash)[12], (*hash)[13], (*hash)[14], (*hash)[15],
    (*hash)[16], (*hash)[17], (*hash)[18], (*hash)[19], (*hash)[20], (*hash)[21], (*hash)[22], (*hash)[23],
    (*hash)[24], (*hash)[25], (*hash)[26], (*hash)[27], (*hash)[28], (*hash)[29], (*hash)[30], (*hash)[31]);
::printf(“\n”);
}

void main() {
    char rnd[128];
    ::sprintf(rnd, “3n + 1 conjecture”);
    unsigned char hash[32];
    CSHA256().Write((const unsigned char *)rnd, ::strlen(rnd)).Finalize(hash);
    hex_printf(&hash);
}

result hash (“3n + 1 conjecture”, normal status, sha256):
0x944843b3af128a9217a7b13526d570d83ab9888e20ff1b72c9ee65882986d32f — (1)

暗号通貨短編