Open chheangdx opened 3 years ago
Thanks for catching the typo. It is now fixed. I was debating if I wanted to use options. But then I started thinking a way to shield the application programmer, which I categorize them as UI code base from the encrption implemention detail, that's why the parameters are strings instead of actual modules. On the other hand, I am not a fan of using generic object as options, which the underlying code will need to do a lot of value checking. That being said, my intention is to make libraries plugable, but not making the API generic in a way that paramters, if coded in a strongly type language, of type objects. Anyhow, I hope I am express my consideration clearly. Please let me know if you have more thoughts on this.
Thanks for the time reviewing my code! It's helpful to encourage me to revisit the design.
@chheangdx I have committed new code pertained to creating encryotion key and hmac key. Both of which use create_key().
Update: Apr 16
This is all I have for you today. I skimmed through the other files and didn't see anything that caught my eye.
I hope we don't have to do unit testing LOL
Overall from our discussion, seems like you are able to get the implementation working. You are just working on cleaning things up.
keycreationlib.py
If you are interested in going further, I suggest encapsulating the methods into a Class, make create_key private (__create_key), and use create_key_with_pbkdf2 as your public method. Might be something to think of for the other parts of the program.
ciphershemes.py Suggestion to put your encrypt and decrypt methods here
Other I suggest putting your files such keycreationlib.py and ciphershemes.py into a folder so that the root directory just contains the readme, playpen, and main program.