Refactored out helper function for msg.decrypt*