We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e489fd commit 17a4679Copy full SHA for 17a4679
room1/test.c
@@ -0,0 +1,22 @@
1
+#include <stdio.h>
2
+#include <string.h>
3
+#include "challenge_response.h"
4
+
5
+int main() {
6
+ int i;
7
+ char *hash_inp[3] = {"132|31", "0", "123456789"};
8
+ long hash_exp[3] = {33331376034, 173811, 18429362615268};
9
+ for(i = 0; i < 3; i++) {
10
+ printf("Hash of %s Expected: %ld Actual: %ld\n",hash_inp[i], hash_exp[i], gen_hash(hash_inp[i]));
11
+ }
12
+ char enc_inp[3] = {'5', '0', '9'};
13
+ char dec_inp[3] = {'8', '3', '2'};
14
15
+ printf("Encrytion of %c Expected: %c Actual: %c\n", enc_inp[i], dec_inp[i], encrypt(enc_inp[i]));
16
17
18
19
+ printf("Decryption of %c Expected: %c Actual: %c\n",dec_inp[i], enc_inp[i], decrypt(dec_inp[i]));
20
21
+ return 0;
22
+}
0 commit comments