Skip to content

rc_hash_generate

Jamiras edited this page Jun 17, 2025 · 2 revisions

Generates a single RetroAchievements hash.

Syntax

int rc_hash_generate(
    char hash[33], 
    int console_id, 
    const rc_hash_iterator_t* iterator
);

Parameters

hash

A buffer to write the calculated hash into. The resulting hash will be 32 characters long, plus a null terminator.

console_id

Specifies the console associated to the file data to be hashed.

For a list of known consoles, see rconsoles.h. Note that not all consoles identified in the enum currently have hashing support.

iterator

Pointer to an rc_hash_iterator object previously initialized by rc_hash_initialize_iterator.

Return value

If the function succeeds, the return value is non-zero and hash will be populated with the calculated hash.

If the function fails, the return value is zero. To capture the failure reason, set the error_message callback in the iterator.

Remarks

Additional details about the hashing process can be captured by setting the version_message callback in the iterator.

Minimum version: 12.0.0

See also

rc_hash_initialize_iterator

rc_hash_iterate

rc_hash_destroy_iterator

rcheevos
rc_client

Integration guide

client

user

game

processing

rc_client_raintegration

Integration guide

rc_runtime
rhash
rapi

common

user

runtime

info

Clone this wiki locally