C# Class SharpCifs.Smb.SigningDigest

To filter 0 len updates and for debugging
Show file Open project: brandonprry/Potato Class Usage Examples

Public Methods

Method Description
Digest ( ) : byte[]
SigningDigest ( SmbTransport transport, NtlmPasswordAuthentication auth ) : System
SigningDigest ( byte macSigningKey, bool bypass ) : System
ToString ( ) : string
Update ( byte input, int offset, int len ) : void

Private Methods

Method Description
Sign ( byte data, int offset, int length, ServerMessageBlock request, ServerMessageBlock response ) : void

Performs MAC signing of the SMB.

Performs MAC signing of the SMB. This is done as follows. The signature field of the SMB is overwritted with the sequence number; The MD5 digest of the MAC signing key + the entire SMB is taken; The first 8 bytes of this are placed in the signature field.

Verify ( byte data, int offset, ServerMessageBlock response ) : bool

Performs MAC signature verification.

Performs MAC signature verification. This calculates the signature of the SMB and compares it to the signature field on the SMB itself.

Method Details

Digest() public method

public Digest ( ) : byte[]
return byte[]

SigningDigest() public method

public SigningDigest ( SmbTransport transport, NtlmPasswordAuthentication auth ) : System
transport SmbTransport
auth NtlmPasswordAuthentication
return System

SigningDigest() public method

public SigningDigest ( byte macSigningKey, bool bypass ) : System
macSigningKey byte
bypass bool
return System

ToString() public method

public ToString ( ) : string
return string

Update() public method

public Update ( byte input, int offset, int len ) : void
input byte
offset int
len int
return void