public void ApplyEncryptionSettings(FileSystemOptions oldOptions) { if (oldOptions == null) throw new ArgumentNullException("oldOptions"); _encryptedEncryptionKey = oldOptions._encryptedEncryptionKey; EncryptionKey = oldOptions.EncryptionKey; _streamCodingStrategy = oldOptions._streamCodingStrategy; }
internal void InitializeStreamCodingStrategy(string password) { if (Encryption != StreamEncryptionType.None) EncryptionKey = TransformEncryptionKey(_encryptedEncryptionKey, password); _streamCodingStrategy = new StramStrategyResolver(this).ResolveStrategy(); }
/// <summary> /// Initializes a new instance of the <see cref="StreamCompressionEncryptionCodingStrategy"/> class. /// </summary> /// <param name="streamCompressionStrategy">The stream compression strategy.</param> /// <param name="streamEncryptionStrategy">The stream encryption strategy.</param> public StreamCompressionEncryptionCodingStrategy(IStreamCodingStrategy streamCompressionStrategy, IStreamCodingStrategy streamEncryptionStrategy) { _streamCompressionStrategy = streamCompressionStrategy; _streamEncryptionStrategy = streamEncryptionStrategy; }