Open homonto opened 2 years ago
@homonto One possible solution to storing the key in the (ELF) binary as a non-string (i.e. not be visible in the .rodata
section) is to statically -- and painfully -- initialize the elements of an array of, say, type float
to numerical values corresponding to the (ASCII) characters of the key. Then, at runtime, you could malloc()
a char *
buffer and initialize its elements (via a loop) using typecasts of the corresponding elements in the FP array. This dynamically allocated char *
buffer becomes C-string key. Does this make sense?
Hi, I started using your library for my project and there are 2 issues:
when my assignment looks like this:
Program compiles but warnings are there - I am sure cleaner compilation would be better ;-) Changing to:
char* key = (char*)"mykey";
solves the issue but the same is with regards to hardcoded declaration in Cipher.cppBtw: thank you for your great job!