Refactored existing code and added support for symmetric encryption.

I'm open to changing this, I just liked that this was more explicit. You don't have to think what value will a byte array get initialized to.