< Summary

Class:Azure.Storage.ClientSideEncryptionOptions
Assembly:Azure.Storage.Common
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Common\src\ClientsideEncryptionOptions.cs
Covered lines:5
Uncovered lines:2
Coverable lines:7
Total lines:53
Line coverage:71.4% (5 of 7)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_EncryptionVersion()-0%100%
get_KeyEncryptionKey()-100%100%
get_KeyResolver()-0%100%
get_KeyWrapAlgorithm()-100%100%
.ctor(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Common\src\ClientsideEncryptionOptions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using Azure.Core.Cryptography;
 6
 7namespace Azure.Storage
 8{
 9    /// <summary>
 10    /// Provides the client configuration options for connecting to Azure Blob using clientside encryption.
 11    /// </summary>
 12    public class ClientSideEncryptionOptions
 13    {
 14        // NOTE there is a non-public Clone method for this class, compile-included into relevant packages from
 15        // Shared/ClientsideEncryption/ClientSideEncryptionOptionsExtensions.cs
 16
 17        /// <summary>
 18        /// The version of clientside encryption to use.
 19        /// </summary>
 020        public ClientSideEncryptionVersion EncryptionVersion { get; }
 21
 22        /// <summary>
 23        /// Required for upload operations.
 24        /// The key used to wrap the generated content encryption key.
 25        /// For more information, see https://docs.microsoft.com/en-us/azure/storage/common/storage-client-side-encrypti
 26        /// </summary>
 1227        public IKeyEncryptionKey KeyEncryptionKey { get; set; }
 28
 29        /// <summary>
 30        /// Required for download operations.
 31        /// Fetches the correct key encryption key to unwrap the downloaded content encryption key.
 32        /// For more information, see https://docs.microsoft.com/en-us/azure/storage/common/storage-client-side-encrypti
 33        /// </summary>
 034        public IKeyEncryptionKeyResolver KeyResolver { get; set; }
 35
 36        /// <summary>
 37        /// Required for upload operations.
 38        /// The algorithm identifier to use when wrapping the content encryption key. This is passed into
 39        /// <see cref="IKeyEncryptionKey.WrapKey(string, ReadOnlyMemory{byte}, System.Threading.CancellationToken)"/>
 40        /// and its async counterpart.
 41        /// </summary>
 1242        public string KeyWrapAlgorithm { get; set; }
 43
 44        /// <summary>
 45        /// Initializes a new instance of the <see cref="ClientSideEncryptionOptions"/> class.
 46        /// </summary>
 47        /// <param name="version">The version of clientside encryption to use.</param>
 648        public ClientSideEncryptionOptions(ClientSideEncryptionVersion version)
 49        {
 650            EncryptionVersion = version;
 651        }
 52    }
 53}