C# Class Renci.SshNet.Security.Cryptography.CipherDigitalSignature

Implements digital signature where where asymmetric cipher is used,
Inheritance: DigitalSignature
显示文件 Open project: sshnet/SSH.NET

Public Methods

Method Description
Sign ( byte input ) : byte[]

Creates the signature.

Verify ( byte input, byte signature ) : bool

Verifies the signature.

Protected Methods

Method Description
CipherDigitalSignature ( ObjectIdentifier oid, AsymmetricCipher cipher ) : System

Initializes a new instance of the CipherDigitalSignature class.

DerEncode ( byte hashData ) : byte[]

Encodes hash using DER.

Hash ( byte input ) : byte[]

Hashes the specified input.

Method Details

CipherDigitalSignature() protected method

Initializes a new instance of the CipherDigitalSignature class.
protected CipherDigitalSignature ( ObjectIdentifier oid, AsymmetricCipher cipher ) : System
oid Renci.SshNet.Common.ObjectIdentifier The object identifier.
cipher AsymmetricCipher The cipher.
return System

DerEncode() protected method

Encodes hash using DER.
protected DerEncode ( byte hashData ) : byte[]
hashData byte The hash data.
return byte[]

Hash() protected abstract method

Hashes the specified input.
protected abstract Hash ( byte input ) : byte[]
input byte The input.
return byte[]

Sign() public method

Creates the signature.
public Sign ( byte input ) : byte[]
input byte The input.
return byte[]

Verify() public method

Verifies the signature.
public Verify ( byte input, byte signature ) : bool
input byte The input.
signature byte The signature.
return bool