Skip to content

Commit 60b4f34

Browse files
committed
Removed my Mersenne twister implementation submodule.
Users should not have to download another software to just use DES.
1 parent 20f8f48 commit 60b4f34

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

.gitmodules

-3
This file was deleted.

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
SHELL = /bin/sh
22
CC = gcc
3-
CFLAGS = -O2 -std=c11 -Wall -Wextra -I./mersenne-twister/include
3+
CFLAGS = -O2 -std=c11 -Wall -Wextra
44
RM = rm -f
55

6-
Sources = des.c ./mersenne-twister/lib/mt19937.c
6+
Sources = des.c
77
Executable = des
88

99
.PHONY: clean

des.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include <stdlib.h>
66
#include <string.h>
77

8-
#include "mt19937.h"
9-
108
// Initial permutation.
119
int const IP[64] =
1210
{
@@ -380,9 +378,8 @@ int main(int const argc, char const *argv[])
380378
return EXIT_SUCCESS;
381379
}
382380

383-
mt19937_64_seed(0);
384-
uint64_t key = argc >= 2 ? parse_hexadecimal(argv[1]) : mt19937_64_rand();
385-
uint64_t state = argc >= 3 ? parse_hexadecimal(argv[2]) : mt19937_64_rand();
381+
uint64_t key = argc >= 2 ? parse_hexadecimal(argv[1]) : 0;
382+
uint64_t state = argc >= 3 ? parse_hexadecimal(argv[2]) : 0;
386383
if(argc >= 4 && strcmp(argv[3], "decrypt") == 0)
387384
{
388385
des_demo(key, state, false);

mersenne-twister

-1
This file was deleted.

0 commit comments

Comments
 (0)