public void TestApplyEncryptionSettings() { var o = TestHelper.CreateFileSystemOptions(""); var o2 = new FileSystemOptions(o.Location, StreamEncryptionType.None, StreamCompressionType.None); o.EncryptionKey = new byte[] { 1, 2, 3 }; Assert.IsNotNull(o.EncryptionKey); Assert.IsNull(o2.EncryptionKey); o2.ApplyEncryptionSettings(o); Assert.AreEqual(o.EncryptionKey, o2.EncryptionKey); Assert.AreEqual(1, o2.EncryptionKey[0]); Assert.AreEqual(2, o2.EncryptionKey[1]); Assert.AreEqual(3, o2.EncryptionKey[2]); }
public void TestApplyEncryptionSettingFail() { var o2 = new FileSystemOptions("", StreamEncryptionType.None, StreamCompressionType.None); o2.ApplyEncryptionSettings(null); }
public void Reload(FileSystemOptions newOptions) { newOptions.ApplyEncryptionSettings(_options); _options = newOptions; _blockAllocation = _options.BlockAllocation; // TODO: reload indexing service // SearchService.StartIndexing(_searchService, this); Root = LatestRoot = ImportRootFolder(); }