repositories
/
sws1-1415.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
thing
[sws1-1415.git]
/
ass5a
/
sws1-assignment5-s4109503-s4202015
/
exercise1a
1
#include <stdio.h>
2
3
int main(void)
4
{
5
char buf[20];
6
int ok = 0;
7
int i = 0;
8
for(i = 0; i < 20; i++)
9
buf[i] = 0;
10
11
printf("Please enter your password: ");
12
gets(buf);
13
14
if(hash_equal("\x75\x97\xf6\x8c\x1c\x45\xb1\x1a\xde\x48\xa8\xd0\xb3\xe1\xdb\x1c\xec\xbe\x2d", sha256(buf)))
15
printf("You're root!\n");
16
else
17
printf("Wrong password\n");
18
return 0;
19
}