< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-100%100%
get_Algorithm()-100%100%
get_Digest()-100%100%
get_Signature()-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\KeyVerifyParameters.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Text.Json;
 5
 6namespace Azure.Security.KeyVault.Keys
 7{
 8    internal struct KeyVerifyParameters : IJsonSerializable
 9    {
 210        private static readonly JsonEncodedText s_algorithmPropertyNameBytes = JsonEncodedText.Encode("alg");
 211        private static readonly JsonEncodedText s_digestPropertyNameBytes = JsonEncodedText.Encode("digest");
 212        private static readonly JsonEncodedText s_signaturePropertyNameBytes = JsonEncodedText.Encode("value");
 13
 63614        public string Algorithm { get; set; }
 15
 63616        public byte[] Digest { get; set; }
 17
 63618        public byte[] Signature { get; set; }
 19
 20        void IJsonSerializable.WriteProperties(Utf8JsonWriter json)
 21        {
 21222            if (Algorithm != null)
 23            {
 21224                json.WriteString(s_algorithmPropertyNameBytes, Algorithm);
 25            }
 21226            if (Digest != null)
 27            {
 21228                json.WriteString(s_digestPropertyNameBytes, Base64Url.Encode(Digest));
 29            }
 21230            if (Signature != null)
 31            {
 21232                json.WriteString(s_signaturePropertyNameBytes, Base64Url.Encode(Signature));
 33            }
 21234        }
 35    }
 36}