Table of Contents

Class StrongNameKeyStructure

Namespace
AsmResolver.PE.DotNet.StrongName
Assembly
AsmResolver.PE.dll

Provides a base for strong name key structures.

public abstract class StrongNameKeyStructure : SegmentBase, ISegment, IOffsetProvider, IWritable
Inheritance
StrongNameKeyStructure
Implements
Derived
Inherited Members

Properties

SignatureAlgorithm

Gets the algorithm used.

public abstract SignatureAlgorithm SignatureAlgorithm { get; }

Property Value

SignatureAlgorithm

Type

Gets the type of structure that is encoded.

public abstract StrongNameKeyStructureType Type { get; }

Property Value

StrongNameKeyStructureType

Version

Gets the version number of the structure.

public abstract byte Version { get; }

Property Value

byte

Methods

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public override uint GetPhysicalSize()

Returns

uint

The number of bytes.

ReadBlobHeader(ref BinaryStreamReader, StrongNameKeyStructureType, byte, SignatureAlgorithm)

Reads and verifies the blob header at the provided input stream.

protected static void ReadBlobHeader(ref BinaryStreamReader reader, StrongNameKeyStructureType expectedType, byte expectedVersion, SignatureAlgorithm expectedAlgorithm)

Parameters

reader BinaryStreamReader

The input stream.

expectedType StrongNameKeyStructureType

The expected structure type to read.

expectedVersion byte

The expected structure version to read.

expectedAlgorithm SignatureAlgorithm

The expected algorithm.

Exceptions

FormatException

Occurs when the input stream is not in the correct format.

NotSupportedException

Occurs when an invalid or unsupported algorithm is specified.

Write(BinaryStreamWriter)

Serializes the structure to an output stream.

public override void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.