Skip to content
Snippets Groups Projects
Commit 23e8f5d5 authored by ChouTatsumi's avatar ChouTatsumi
Browse files

fix some warning

parent fe65003f
Branches
No related tags found
No related merge requests found
......@@ -20,11 +20,17 @@ int main(int argc, char** argv) {
// record 30 passwords
FILE* pwdfp;
unsigned char buffer[SHA256_BLOCK_SIZE];
int status;
pwdfp = fopen(PWD4_FILENAME, "rb");
// read 32 bytes to buffer
fread(buffer, SHA256_BLOCK_SIZE, 1, pwdfp);
status = fread(buffer, SHA256_BLOCK_SIZE, 1, pwdfp);
if (status < 0) {
fprintf(stderr, "ERROR reading binary file\n");
exit(0);
}
printf("%s", buffer);
......@@ -54,7 +60,7 @@ int main(int argc, char** argv) {
void check_guess(BYTE guess[], BYTE pwd[PWD_NUMBERS][SHA256_BLOCK_SIZE]) {
SHA256_CTX ctx;
BYTE buf[SHA256_BLOCK_SIZE];
size_t guess_len = strlen(guess);
size_t guess_len = strlen((char*)&guess);
int i;
sha256_init(&ctx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment