C# Class SupportClass.MessageDigestSupport, csharp-ldap

Encapsulates the functionality of message digest algorithms such as SHA-1 or MD5.
Exibir arquivo Open project: EventStore/csharp-ldap

Public Methods

Method Description
GetInstance ( System algorithm ) : MessageDigestSupport

Generates a new instance of the MessageDigestSupport class using the specified algorithm

MessageDigestSupport ( System algorithm ) : System

Creates a message digest using the specified name to set Algorithm property.

Reset ( ) : void

Resets the digest data to the initial state.

ToString ( ) : string

Returns a string representation of the Message Digest

Update ( byte newData ) : void

Updates the digest data with the specified array of bytes by making an append operation in the internal array of data.

Update ( byte newData, int offset, int count ) : void

Updates the specified count of bytes with the input array of bytes starting at the input offset.

Private Methods

Method Description
DigestData ( ) : sbyte[]
DigestData ( byte newData ) : sbyte[]
EquivalentDigest ( System firstDigest, System secondDigest ) : bool

Method Details

GetInstance() public static method

Generates a new instance of the MessageDigestSupport class using the specified algorithm
public static GetInstance ( System algorithm ) : MessageDigestSupport
algorithm System The name of the algorithm to use
return MessageDigestSupport

MessageDigestSupport() public method

Creates a message digest using the specified name to set Algorithm property.
public MessageDigestSupport ( System algorithm ) : System
algorithm System The name of the algorithm to use
return System

Reset() public method

Resets the digest data to the initial state.
public Reset ( ) : void
return void

ToString() public method

Returns a string representation of the Message Digest
public ToString ( ) : string
return string

Update() public method

Updates the digest data with the specified array of bytes by making an append operation in the internal array of data.
public Update ( byte newData ) : void
newData byte The array of bytes for the update operation
return void

Update() public method

Updates the specified count of bytes with the input array of bytes starting at the input offset.
public Update ( byte newData, int offset, int count ) : void
newData byte The array of bytes for the update operation
offset int The initial position to start from in the array of bytes
count int The number of bytes fot the update
return void