< Summary - Combined Code Coverage

Information
Class: NLightning.Infrastructure.Crypto.Providers.Native.Ciphers.ChaCha20
Assembly: NLightning.Infrastructure
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure/Crypto/Providers/Native/Ciphers/ChaCha20.cs
Tag: 30_15166811759
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 19
Line coverage: 0%
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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
QuarterRound(...)100%210%
RotateLeft(...)100%210%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure/Crypto/Providers/Native/Ciphers/ChaCha20.cs

#LineLine coverage
 1#if CRYPTO_NATIVE
 2namespace NLightning.Infrastructure.Crypto.Providers.Native.Ciphers;
 3
 4public static class ChaCha20
 5{
 6    public static void QuarterRound(ref uint a, ref uint b, ref uint c, ref uint d)
 7    {
 08        a += b; d = RotateLeft(d ^ a, 16);
 09        c += d; b = RotateLeft(b ^ c, 12);
 010        a += b; d = RotateLeft(d ^ a, 8);
 011        c += d; b = RotateLeft(b ^ c, 7);
 012    }
 13
 14    private static uint RotateLeft(uint value, int offset)
 15    {
 016        return (value << offset) | (value >> (32 - offset));
 17    }
 18}
 19#endif