< Summary

Class:Azure.Security.KeyVault.Keys.KeySignParameters
Assembly:Azure.Security.KeyVault.Keys
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Keys\src\Cryptography\KeySignParameters.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:28
Line coverage:100% (9 of 9)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-100%100%
get_Algorithm()-100%100%
get_Digest()-100%100%
Azure.Security.KeyVault.IJsonSerializable.WriteProperties(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Keys\src\Cryptography\KeySignParameters.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3using System.Text.Json;
 4
 5namespace Azure.Security.KeyVault.Keys
 6{
 7    internal struct KeySignParameters : IJsonSerializable
 8    {
 29        private static readonly JsonEncodedText s_algorithmPropertyNameBytes = JsonEncodedText.Encode("alg");
 210        private static readonly JsonEncodedText s_digestPropertyNameBytes = JsonEncodedText.Encode("value");
 11
 66012        public string Algorithm { get; set; }
 13
 66014        public byte[] Digest { get; set; }
 15
 16        void IJsonSerializable.WriteProperties(Utf8JsonWriter json)
 17        {
 22018            if (Algorithm != null)
 19            {
 22020                json.WriteString(s_algorithmPropertyNameBytes, Algorithm);
 21            }
 22022            if (Digest != null)
 23            {
 22024                json.WriteString(s_digestPropertyNameBytes, Base64Url.Encode(Digest));
 25            }
 22026        }
 27    }
 28}