Android Guides | Samples

Javax.Crypto.Mac Class

This class provides the public API for Message Authentication Code (MAC) algorithms.

See Also: Mac

Syntax

[Android.Runtime.Register("javax/crypto/Mac", DoNotGenerateAcw=true)]
public class Mac : Object, ICloneable, IDisposable

Remarks

This class provides the public API for Message Authentication Code (MAC) algorithms.

[Android Documentation]

Requirements

Namespace: Javax.Crypto
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Javax.Crypto.Mac are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.
Creates a new Mac instance.

Public Properties

[read-only]
AlgorithmString. Returns the name of the MAC algorithm.
[read-only]
MacLengthInt32. Returns the length of this MAC (in bytes).
[read-only]
ProviderProvider. Returns the provider of this Mac instance.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Clone() : Object
Clones this Mac instance and the underlying implementation.
DoFinal() : Byte[]
Computes the digest of this MAC based on the data previously specified in Mac.Update(SByte) calls.
DoFinal(Byte[]) : Byte[]
Computes the digest of this MAC based on the data previously specified on Mac.Update(SByte) calls and on the final bytes specified by input (or based on those bytes only).
DoFinal(Byte[], Int32)
Computes the digest of this MAC based on the data previously specified in Mac.Update(SByte) calls and stores the digest in the specified output buffer at offset outOffset.
static
GetInstance(String) : Mac
Creates a new Mac instance that provides the specified MAC algorithm.
static
GetInstance(String, Provider) : Mac
Creates a new Mac instance that provides the specified MAC algorithm from the specified provider.
static
GetInstance(String, String) : Mac
Creates a new Mac instance that provides the specified MAC algorithm from the specified provider.
Init(IKey)
Initializes this Mac instance with the specified key.
Init(IKey, IAlgorithmParameterSpec)
Initializes this Mac instance with the specified key and algorithm parameters.
Reset()
Resets this Mac instance to its initial state.
Update(ByteBuffer)
Updates this Mac instance with the data from the specified buffer, starting at Buffer.Position, including the next Buffer.Remaining bytes.
Update(Byte[])
Copies the buffer provided as input for further processing.
Update(SByte)
Updates this Mac instance with the specified byte.
Update(Byte[], Int32, Int32)
Updates this Mac instance with the data from the specified buffer input from the specified offset and length len.