# < 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

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
get_KeySize() | 100% | 1 | 100%
get_Cipher() | 100% | 1 | 100%
.ctor(...) | 100% | 1 | 100%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | `using Renci.SshNet.Common;`
|  | `3` |  | `using Renci.SshNet.Security.Cryptography;`
|  | `4` |  | ``
|  | `5` |  | `namespace 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>`
| 49792 | `18` |  | `public int KeySize { get; private set; }`
|  | `19` |  | ``
|  | `20` |  | `/// <summary>`
|  | `21` |  | `/// Gets the cipher.`
|  | `22` |  | `/// </summary>`
| 47342 | `23` |  | `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>`
| 44905 | `30` |  | `public CipherInfo(int keySize, Func<byte[], byte[], Cipher> cipher)`
| 44905 | `31` |  | `{`
| 44905 | `32` |  | `KeySize = keySize;`
| 47342 | `33` |  | `Cipher = (key, iv) => cipher(key.Take(KeySize / 8), iv);`
| 44905 | `34` |  | `}`
|  | `35` |  | `}`
|  | `36` |  | `}`

# Methods/Properties

get_KeySize()
get_Cipher()
.ctor(System.Int32,System.Func`3<System.Byte[],System.Byte[],Renci.SshNet.Security.Cryptography.Cipher>)