< Summary

Information
Class: Renci.SshNet.CipherInfo
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\CipherInfo.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 36
Line coverage: 100%
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 Cyclomatic complexity Line coverage
get_KeySize()100%1100%
get_Cipher()100%1100%
.ctor(...)100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\CipherInfo.cs

#LineLine coverage
 1using System;
 2using Renci.SshNet.Common;
 3using Renci.SshNet.Security.Cryptography;
 4
 5namespace Renci.SshNet
 6{
 7    /// <summary>
 8    /// Holds information about key size and cipher to use.
 9    /// </summary>
 10    public class CipherInfo
 11    {
 12        /// <summary>
 13        /// Gets the size of the key.
 14        /// </summary>
 15        /// <value>
 16        /// The size of the key.
 17        /// </value>
 4979218        public int KeySize { get; private set; }
 19
 20        /// <summary>
 21        /// Gets the cipher.
 22        /// </summary>
 4734223        public Func<byte[], byte[], Cipher> Cipher { get; private set; }
 24
 25        /// <summary>
 26        /// Initializes a new instance of the <see cref="CipherInfo"/> class.
 27        /// </summary>
 28        /// <param name="keySize">Size of the key.</param>
 29        /// <param name="cipher">The cipher.</param>
 4490530        public CipherInfo(int keySize, Func<byte[], byte[], Cipher> cipher)
 4490531        {
 4490532            KeySize = keySize;
 4734233            Cipher = (key, iv) => cipher(key.Take(KeySize / 8), iv);
 4490534        }
 35    }
 36}