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?

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.