< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Certificates.CsrResult
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Certificates/CsrResult.cs
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
60%
Covered lines: 9
Uncovered lines: 6
Coverable lines: 15
Total lines: 30
Line coverage: 60%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_CsrPem()100%11100%
get_CsrDer()100%210%
get_PrivateKey()100%11100%
get_PrivateKeyPem()100%210%
get_PrivateKeyDer()100%210%
get_PrivateKeyPemEncrypted()100%210%
get_PublicKeyPem()100%210%
get_PublicKeyDer()100%210%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Certificates/CsrResult.cs

#LineLine coverage
 1
 2using Org.BouncyCastle.Crypto;
 3
 4namespace Kestrun.Certificates;
 5/// <summary>
 6/// Represents the result of creating a Certificate Signing Request (CSR), including the PEM-encoded CSR and the private
 7/// </summary>
 8/// <param name="CsrPem">The PEM-encoded CSR string.</param>
 9/// <param name="CsrDer">The DER-encoded CSR bytes.</param>
 10/// <param name="PrivateKey">The private key associated with the CSR.</param>
 11/// <param name="PrivateKeyPem">The PEM-encoded private key string.</param>
 12/// <param name="PrivateKeyDer">The DER-encoded private key bytes.</param>
 13/// <param name="PrivateKeyPemEncrypted">The PEM-encoded encrypted private key string, if an encryption password was pro
 14/// <param name="PublicKeyPem">The PEM-encoded public key string.</param>
 15/// <param name="PublicKeyDer">The DER-encoded public key bytes.</param>
 216public record CsrResult(
 217    // CSR
 318    string CsrPem,
 019    byte[] CsrDer,
 220
 221    // Private key
 322    AsymmetricKeyParameter PrivateKey, // for programmatic use
 023    string PrivateKeyPem,              // -----BEGIN PRIVATE KEY-----
 024    byte[] PrivateKeyDer,              // PKCS#8 DER
 025    string? PrivateKeyPemEncrypted,    // -----BEGIN ENCRYPTED PRIVATE KEY----- (if password provided)
 226
 227    // Public key
 028    string PublicKeyPem,               // -----BEGIN PUBLIC KEY-----
 029    byte[] PublicKeyDer
 230);