< Summary

Class:Azure.Storage.Cryptography.Models.ClientSideEncryptionAlgorithm
Assembly:Azure.Storage.Blobs
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Common\src\Shared\ClientsideEncryption\Models\ClientSideEncryptionAlgorithm.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:68
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_AesCbc256()-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
op_Implicit(...)-0%100%
Equals(...)-0%0%
Equals(...)-0%100%
GetHashCode()-0%0%
ToString()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Common\src\Shared\ClientsideEncryption\Models\ClientSideEncryptionAlgorithm.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.ComponentModel;
 6
 7namespace Azure.Storage.Cryptography.Models
 8{
 9    /// <summary>
 10    /// Specifies the encryption algorithm used to encrypt and decrypt a blob.
 11    /// </summary>
 12    internal readonly struct ClientSideEncryptionAlgorithm
 13    {
 14        internal const string AesCbc256Value = "AES_CBC_256";
 15
 16        private readonly string _value;
 17
 18        /// <summary>
 19        /// Initializes a new instance of the <see cref="ClientSideEncryptionAlgorithm"/> structure.
 20        /// </summary>
 21        /// <param name="value">The string value of the instance.</param>
 22        public ClientSideEncryptionAlgorithm(string value)
 23        {
 024            _value = value ?? throw new ArgumentNullException(nameof(value));
 025        }
 26
 27        /// <summary>
 28        /// AES-CBC using a 256 bit key.
 29        /// </summary>
 030        public static ClientSideEncryptionAlgorithm AesCbc256 { get; } = new ClientSideEncryptionAlgorithm(AesCbc256Valu
 31
 32        /// <summary>
 33        /// Determines if two <see cref="ClientSideEncryptionAlgorithm"/> values are the same.
 34        /// </summary>
 35        /// <param name="left">The first <see cref="ClientSideEncryptionAlgorithm"/> to compare.</param>
 36        /// <param name="right">The second <see cref="ClientSideEncryptionAlgorithm"/> to compare.</param>
 37        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are the same; otherwise, false.</retur
 038        public static bool operator ==(ClientSideEncryptionAlgorithm left, ClientSideEncryptionAlgorithm right) => left.
 39
 40        /// <summary>
 41        /// Determines if two <see cref="ClientSideEncryptionAlgorithm"/> values are different.
 42        /// </summary>
 43        /// <param name="left">The first <see cref="ClientSideEncryptionAlgorithm"/> to compare.</param>
 44        /// <param name="right">The second <see cref="ClientSideEncryptionAlgorithm"/> to compare.</param>
 45        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are different; otherwise, false.</retu
 046        public static bool operator !=(ClientSideEncryptionAlgorithm left, ClientSideEncryptionAlgorithm right) => !left
 47
 48        /// <summary>
 49        /// Converts a string to a <see cref="ClientSideEncryptionAlgorithm"/>.
 50        /// </summary>
 51        /// <param name="value">The string value to convert.</param>
 052        public static implicit operator ClientSideEncryptionAlgorithm(string value) => new ClientSideEncryptionAlgorithm
 53
 54        /// <inheritdoc/>
 55        [EditorBrowsable(EditorBrowsableState.Never)]
 056        public override bool Equals(object obj) => obj is ClientSideEncryptionAlgorithm other && Equals(other);
 57
 58        /// <inheritdoc/>
 059        public bool Equals(ClientSideEncryptionAlgorithm other) => string.Equals(_value, other._value, StringComparison.
 60
 61        /// <inheritdoc/>
 62        [EditorBrowsable(EditorBrowsableState.Never)]
 063        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 64
 65        /// <inheritdoc/>
 066        public override string ToString() => _value;
 67    }
 68}