jbubriski/Encryptamajig — pull request #8 by lorddev (2012-10-22 20:38:58+00:00)
Title: 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