Update model.js

encryption during serialization