public MergeableFileHeader(Key key, string title, MergeableFileHeaderFlags flags, DateTime created, DateTime lastManaged, IHashComputable content, AuthServerInfo[] authServers, byte[] sign, Key recordsetHash) { if (created.Kind != DateTimeKind.Utc || lastManaged.Kind != DateTimeKind.Utc) throw new ArgumentException (); if (content == null) throw new ArgumentNullException (); _key = key; _title = title; _flags = flags; _created = created; _lastManaged = lastManaged; _content = content; _authServers = authServers; _sign = sign; _recordsetHash = (recordsetHash != null ? recordsetHash : new Key (new byte[DefaultAlgorithm.HashByteSize])); if (_recordsetHash.KeyBytes != DefaultAlgorithm.HashByteSize) throw new FormatException (); }
public MergeableFileHeader(string title, MergeableFileHeaderFlags flags, IHashComputable content, AuthServerInfo[] authServers) : this(null, title, flags, DateTime.UtcNow, DateTime.UtcNow, content, authServers, null, null) { }