Class MacContextBase
A message authentication code (MAC) context.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class MacContextBase
Constructors
MacContextBase(MacType)
Initializes a new instance of the MacContextBase class.
Declaration
public MacContextBase(MacType type)
Parameters
Type | Name | Description |
---|---|---|
MacType | type | The type. |
Properties
Type
Gets the type.
Declaration
public MacType Type { get; }
Property Value
Type | Description |
---|---|
MacType |
Methods
Compute(DataBuffer)
Computes the message authentication code (MAC).
Declaration
public DataBuffer Compute(DataBuffer input)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | input | The input. |
Returns
Type | Description |
---|---|
DataBuffer |
Compute(MacType, DataBuffer, DataBuffer)
Computes the message authentication code (MAC) for a given type.
Declaration
public static DataBuffer Compute(MacType type, DataBuffer key, DataBuffer input)
Parameters
Type | Name | Description |
---|---|---|
MacType | type | The type. |
DataBuffer | key | The key. |
DataBuffer | input | The input. |
Returns
Type | Description |
---|---|
DataBuffer |
Destroy()
Destroys this instance.
Declaration
public void Destroy()
DoCompute(DataBuffer)
Computes the message authentication code (MAC).
Declaration
protected abstract DataBuffer DoCompute(DataBuffer input)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | input | The input. |
Returns
Type | Description |
---|---|
DataBuffer |
DoDestroy()
Destroys this instance.
Declaration
protected abstract void DoDestroy()