C# 클래스 System.Security.Cryptography.IncrementalHash

상속: IDisposable
파일 보기 프로젝트 열기: dotnet/corefx 1 사용 예제들

공개 메소드들

메소드 설명
AppendData ( byte data ) : void

Append the entire contents of data to the data already processed in the hash or HMAC.

AppendData ( byte data, int offset, int count ) : void

Append count bytes of data, starting at offset, to the data already processed in the hash or HMAC.

CreateHMAC ( HashAlgorithmName hashAlgorithm, byte key ) : IncrementalHash

Create an IncrementalHash for the Hash-based Message Authentication Code (HMAC) algorithm utilizing the hash algorithm specified by hashAlgorithm, and a key specified by key.

CreateHash ( HashAlgorithmName hashAlgorithm ) : IncrementalHash

Create an IncrementalHash for the algorithm specified by hashAlgorithm.

Dispose ( ) : void

Release all resources used by the current instance of the IncrementalHash class.

GetHashAndReset ( ) : byte[]

Retrieve the hash or HMAC for the data accumulated from prior calls to AppendData(byte[]), and return to the state the object was in at construction.

비공개 메소드들

메소드 설명
GetHMAC ( HashAlgorithmName hashAlgorithm, byte key ) : HashAlgorithm
GetHashAlgorithm ( HashAlgorithmName hashAlgorithm ) : HashAlgorithm
IncrementalHash ( HashAlgorithmName name, HashAlgorithm hash ) : System.Diagnostics

메소드 상세

AppendData() 공개 메소드

Append the entire contents of data to the data already processed in the hash or HMAC.
is null. The object has already been disposed.
public AppendData ( byte data ) : void
data byte The data to process.
리턴 void

AppendData() 공개 메소드

Append count bytes of data, starting at offset, to the data already processed in the hash or HMAC.
is null. /// is out of range. This parameter requires a non-negative number. /// /// is out of range. This parameter requires a non-negative number less than /// the value of . /// /// is greater than /// . - . /// The object has already been disposed.
public AppendData ( byte data, int offset, int count ) : void
data byte The data to process.
offset int The offset into the byte array from which to begin using data.
count int The number of bytes in the array to use as data.
리턴 void

CreateHMAC() 공개 정적인 메소드

Create an IncrementalHash for the Hash-based Message Authentication Code (HMAC) algorithm utilizing the hash algorithm specified by hashAlgorithm, and a key specified by key.
/// . is null, or /// the empty string. /// is not a known hash algorithm.
public static CreateHMAC ( HashAlgorithmName hashAlgorithm, byte key ) : IncrementalHash
hashAlgorithm HashAlgorithmName The name of the hash algorithm to perform within the HMAC.
key byte /// The secret key for the HMAC. The key can be any length, but a key longer than the output size /// of the hash algorithm specified by will be hashed (using the /// algorithm specified by ) to derive a correctly-sized key. Therefore, /// the recommended size of the secret key is the output size of the hash specified by /// . ///
리턴 IncrementalHash

CreateHash() 공개 정적인 메소드

Create an IncrementalHash for the algorithm specified by hashAlgorithm.
/// . is null, or /// the empty string. /// is not a known hash algorithm.
public static CreateHash ( HashAlgorithmName hashAlgorithm ) : IncrementalHash
hashAlgorithm HashAlgorithmName The name of the hash algorithm to perform.
리턴 IncrementalHash

Dispose() 공개 메소드

Release all resources used by the current instance of the IncrementalHash class.
public Dispose ( ) : void
리턴 void

GetHashAndReset() 공개 메소드

Retrieve the hash or HMAC for the data accumulated from prior calls to AppendData(byte[]), and return to the state the object was in at construction.
The object has already been disposed.
public GetHashAndReset ( ) : byte[]
리턴 byte[]