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
Type
Gets the type of structure that is encoded.
public abstract StrongNameKeyStructureType Type { get; }
Property Value
Version
Gets the version number of the structure.
public abstract byte Version { get; }
Property Value
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
BinaryStreamReaderThe input stream.
expectedType
StrongNameKeyStructureTypeThe expected structure type to read.
expectedVersion
byteThe expected structure version to read.
expectedAlgorithm
SignatureAlgorithmThe 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
BinaryStreamWriterThe output stream to write the data to.