Renci.SshNet.Security.Key.Sign C# (CSharp) Method

Sign() public method

Signs the specified data with the key.
public Sign ( byte data ) : byte[]
data byte The data to sign.
return byte[]
        public byte[] Sign(byte[] data)
        {
            return DigitalSignature.Sign(data);
        }

Usage Example

 /// <summary>
 /// Signs the specified data.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <returns>
 /// Signed data.
 /// </returns>
 public override byte[] Sign(byte[] data)
 {
     return(new SignatureKeyData(Name, Key.Sign(data)).GetBytes());
 }