-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
34 lines (27 loc) · 893 Bytes
/
main.c
File metadata and controls
34 lines (27 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdio.h>
#include <stdint.h>
#include "rand.h"
int main() {
uint32_t seed1, seed2;
printf("Enter the first seed value (a positive integer): ");
fflush(stdout);
while (scanf("%u", &seed1) != 1) {
printf("Invalid input. Please enter a valid positive integer: ");
fflush(stdout);
while (getchar() != '\n');
}
printf("Enter the second seed value (a positive integer): ");
fflush(stdout);
while (scanf("%u", &seed2) != 1) {
printf("Invalid input. Please enter a valid positive integer: ");
fflush(stdout);
while (getchar() != '\n');
}
uint64_t encrypted_value = generate_encrypted_value(seed1, seed2);
printf("Encrypted 10-digit value: %010llu\n", encrypted_value);
printf("Press Enter to exit...");
fflush(stdout);
while (getchar() != '\n');
getchar();
return 0;
}