0

Hope someones here, I wanna ask if what are the parameters in this code, in line 315:

void cryptonight_hash(void* output, const void* input, const int aes_ni_supported) {
    struct cryptonight_ctx *ctx = (struct cryptonight_ctx*)malloc(sizeof(struct cryptonight_ctx));

    if (aes_ni_supported) {
        cryptonight_hash_ctx_aes_ni(output, input, 76, ctx);
    }
    else
    {
        cryptonight_hash_ctx(output, input, 76, ctx);
    }
    free(ctx);
}

What is the input and output parameter, I havn't read that on my journey here. How do I form a code to get it? where did it came from?

user5824
  • 1
  • 1

1 Answers1

1

input is the block data you want to hash.

output is where the resulting hash will be stored.

aes_ni_supported is a flag to indicate whether the machine running the code has a processor with AES-NI support.

jtgrassie
  • 19,111
  • 4
  • 14
  • 51