Refactored existing code and added support for symmetric encryption.

Interesting, good to know.