Added tests
Fixed encryption method returing always null
Improved test