Refactored existing code and added support for symmetric encryption.

it's -> its