Redislabs-Solution-Architects / CryptoModule

1 stars 1 forks source link

Expose the IV, Key and algorithm as configuration properties #1

Open gkorland opened 6 years ago

gkorland commented 6 years ago

Shouldn't be embedded in the code

static int keysize = 16; /* 128 bits */
static char * IV = "IIIIIIIIIIIIIIIIIIIIIIIIIII";
static char * key = "XXXXXXXXXXXX";
...
...
MCRYPT td = mcrypt_module_open("rijndael-128", NULL, "cbc", NULL);

but set by module configuration

loadmodule cryptomodule.so mcrypto.so IV IIIIIIII KEY XXXXXX ENCRYPTION rijndael-128
shkediy commented 6 years ago

True. This is why I added the init function that can receive parameters.