IBinaryDigest

Description

interface Tinman.Core.Codec.IBinaryDigest

Extended by

BinaryDigest abstract

Base interface for classes that consume binary data and compute a fixed-size digest value for it.

Public / Methods

Begin​Digest


public method BeginDigest → ()

returns → IBinaryDigest

this

Begins to digest a new chunk of binary data.

Finish​Digest​Array


public method FinishDigestArray → (2)

output in : int8 [ ]

[not-null]
The output array.

offset opt : int32 = 0

[0..output.Length-IBinaryDigest.DigestLength]
Offset into output in to first byte of output data block.

Finishes digesting binary data and writes the fixed-size digest value to the given output in.

Finish​Digest​Buffer


[OwnerReturn]
public method FinishDigestBuffer → (1)

output opt : ByteBuffer own = null

The output buffer or null.

returns → ByteBuffer

A buffer holding the digest value.

Finishes digesting binary data and writes the fixed-size digest value to the given output opt.

Before returning, this method sets the ByteBuffer.Position and ByteBuffer.Limit to the range of bytes that have been output.

HMAC


public method HMAC → (1)

key in : int8 [ ]

[not-null]
The secret key.

returns → IBinaryDigest

The HMAC binary digest.

Returns a binary digest that computes a Hash-based Message Authentication Code (HMAC) using this digest.

Update​Digest

3 overloads


public method UpdateDigest1 → (1)

input in : int8

The input data.

returns → IBinaryDigest

this

Processes the given input data.


public method UpdateDigest2 → (3)

input in : int8 [ ]

[not-null]
The input data block.

offset opt : int32 = 0

[0..input.Length]
Offset into input in to first byte of input data block.

length opt : int32 = -1

[-1..input.Length-offset]
Length of input data block, in bytes. If -1 all remaining data is processed.

returns → IBinaryDigest

this

Processes the given input data block.


public method UpdateDigest3 → (1)

input in : ByteBuffer

[not-null]
The input data block.

returns → IBinaryDigest

this

Processes the given input data block.

Public / Attributes

Digest​Length


public attribute DigestLength → (get)

value : int32

[>0]
The digest value length, in bytes.

Length of the fixed-size digest value, in bytes.

Name


public attribute Name → (get)

value : string

[not-null]
The digest name.

Name of this binary digest.

Extensions

Finish​Digest​Array


public static method FinishDigestArray → ()

returns → int8 [ ]

An array holding the digest value.

Finishes digesting binary data and returns the fixed-size digest value as an array.

Update​Digest


public static method UpdateDigest → (1)

input in : string

[not-null]
The input data, interpreted as a sequence of UTF-8 code units.

returns → IBinaryDigest

this

Processes the given input data.