Encryption and saving working