adding encryption support
added encryption support