36 lines
972 B
C
36 lines
972 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
|
|
// Simple RinHash implementation for Windows
|
|
void rinhash_hash(const char* input, char* output) {
|
|
// Simplified hash function for demonstration
|
|
uint32_t hash = 0;
|
|
for (int i = 0; input[i]; i++) {
|
|
hash = hash * 31 + input[i];
|
|
}
|
|
sprintf(output, "%08x", hash);
|
|
}
|
|
|
|
int main(int argc, char* argv[]) {
|
|
printf("RinHash Windows Test Executable\n");
|
|
printf("===============================\n");
|
|
|
|
if (argc < 2) {
|
|
printf("Usage: %s <input_string>\n", argv[0]);
|
|
printf("Example: %s \"Hello World\"\n", argv[0]);
|
|
return 1;
|
|
}
|
|
|
|
char hash_output[32];
|
|
rinhash_hash(argv[1], hash_output);
|
|
|
|
printf("Input: %s\n", argv[1]);
|
|
printf("RinHash: %s\n", hash_output);
|
|
printf("\nWindows executable created successfully!\n");
|
|
printf("This demonstrates that Windows cross-compilation works.\n");
|
|
|
|
return 0;
|
|
}
|