Refactored existing code and added support for symmetric encryption.

We are already returning an array here.