Skip to content

Commit

Permalink
Update bitmap.c function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteube committed Oct 6, 2016
1 parent 3d1237a commit 0155c9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 2 additions & 4 deletions include/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

#include <string.h>

int sort_by_bitmap (const void *s1, const void *s2);

void bitmap_ctx_init (bitmap_ctx_t *bitmap_ctx, const user_options_t *user_options, const hashconfig_t *hashconfig, const hashes_t *hashes);
void bitmap_ctx_destroy (bitmap_ctx_t *bitmap_ctx);
void bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx);
void bitmap_ctx_destroy (hashcat_ctx_t *hashcat_ctx);

#endif // _BITMAP_H
11 changes: 9 additions & 2 deletions src/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ static u32 generate_bitmaps (const u32 digests_cnt, const u32 dgst_size, const u
return collisions;
}

void bitmap_ctx_init (bitmap_ctx_t *bitmap_ctx, const user_options_t *user_options, const hashconfig_t *hashconfig, const hashes_t *hashes)
void bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx)
{
bitmap_ctx_t *bitmap_ctx = hashcat_ctx->bitmap_ctx;
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
hashes_t *hashes = hashcat_ctx->hashes;
user_options_t *user_options = hashcat_ctx->user_options;

bitmap_ctx->enabled = false;

if (user_options->keyspace == true) return;
Expand Down Expand Up @@ -131,8 +136,10 @@ void bitmap_ctx_init (bitmap_ctx_t *bitmap_ctx, const user_options_t *user_optio
bitmap_ctx->bitmap_s2_d = bitmap_s2_d;
}

void bitmap_ctx_destroy (bitmap_ctx_t *bitmap_ctx)
void bitmap_ctx_destroy (hashcat_ctx_t *hashcat_ctx)
{
bitmap_ctx_t *bitmap_ctx = hashcat_ctx->bitmap_ctx;

if (bitmap_ctx->enabled == false) return;

myfree (bitmap_ctx->bitmap_s1_a);
Expand Down

0 comments on commit 0155c9d

Please sign in to comment.