Added encryption.
Tried to handle java8 bug.
Tried to handle java8 bug.