public EncrytpedRecord(Unpacker unpacker) { KeyInfo = SecretKeyInfo.Restore(unpacker); SecretInput = new ScryptInput(unpacker); unpacker.Unpack(out byte[] data); RecordData = Encryption.Restore(new ArraySegment <byte>(data)); }
public TodoList(Unpacker unpacker, Todo todo, ServiceNode serviceNode) { unpacker.Unpack(out byte dataVersion); unpacker.Unpack(out ListId); LastProcessedTransactionId = unpacker.UnpackLong(); if (unpacker.UnpackBool()) { LastUsedSecretKeyInfo = SecretKeyInfo.Restore(unpacker); } unpacker.Unpack(_items, (u) => new TodoTask(u)); unpacker.Unpack(_historyTransactionIds); if (unpacker.UnpackBool()) { CurrentListNameRecord = new TodoRecordStorage <TodoListNameRecord>(unpacker); } Index = BuildIndex(ListId); ServiceNode = serviceNode; Todo = todo; }
EncrytpedRecord(SecretKeyInfo keyInfo, ScryptInput secretInput, Encryption recordData) { KeyInfo = keyInfo; SecretInput = secretInput; RecordData = recordData; }