Encryptamajig
Encryptamajig copied to clipboard
Functionalized a little bit...
Hi John!
I found your encryptor on Stack Exchange and thought I would fork it.
I moved everything up two levels in the directory tree to make it easier to type the paths in and separated code blocks into smaller functions to improve readability, especially regarding placement of nested usings. I also added a DeriveResult struct to carry key, iv pairs when passing between functions.
My next recommendation, at least for this fork, would be to change it into a class that's not static, so that we can reference some of the parameters as private fields instead of passing them from function to function. I also think it might help to have it work as a sort of singleton so that once the key/salt/iv bytes were initialized they wouldn't have to be recalculated for every operation. This would help improve performance for larger-scale encryption operations.
Cheers,
Aaron Lord
Hi Aaron, thanks for the PR! I'm pretty slammed this week, but I'll try and take a look at the code soon.