Renci.SshNet.Common.DerData.Encode C# (CSharp) Method

Encode() public method

Encodes written data as DER byte array.
public Encode ( ) : byte[]
return byte[]
        public byte[] Encode()
        {
            var length = _data.Count;
            var lengthBytes = GetLength(length);

            _data.InsertRange(0, lengthBytes);
            _data.Insert(0, Constructed | Sequence);

            return _data.ToArray();
        }

Usage Example

コード例 #1
0
ファイル: DerDataTest.cs プロジェクト: delfinof/ssh.net
 public void EncodeTest()
 {
     DerData target = new DerData(); // TODO: Initialize to an appropriate value
     byte[] expected = null; // TODO: Initialize to an appropriate value
     byte[] actual;
     actual = target.Encode();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
All Usage Examples Of Renci.SshNet.Common.DerData::Encode