Browse Source

refine

pull/4/merge
Max Lv 11 years ago
parent
commit
e63a6c0cef
1 changed files with 2 additions and 6 deletions
  1. 8
      encrypt.c

8
encrypt.c

@ -23,7 +23,6 @@ static int random_compare(const void *_x, const void *_y) {
return (a % (x + i) - a % (y + i));
}
static void merge(uint8_t *left, int llength, uint8_t *right, int rlength)
{
/* Temporary memory locations for the 2 segments of the array to merge. */
@ -162,8 +161,8 @@ void enc_key_init(const char *pass) {
}
void get_table(const char *pass) {
uint8_t *enc_table = enc_ctx.table.encrypt_table;
uint8_t *dec_table = enc_ctx.table.decrypt_table;
uint8_t *enc_table = malloc(256);
uint8_t *dec_table = malloc(256);
uint8_t digest[16];
uint32_t i;
@ -173,9 +172,6 @@ void get_table(const char *pass) {
_a += OFFSET_ROL(digest, i);
}
enc_table = malloc(256);
dec_table = malloc(256);
for(i = 0; i < 256; ++i) {
enc_table[i] = i;
}

Loading…
Cancel
Save