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
readerBinaryStreamReaderThe input stream.
expectedTypeStrongNameKeyStructureTypeThe expected structure type to read.
expectedVersionbyteThe expected structure version to read.
expectedAlgorithmSignatureAlgorithmThe 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
writerBinaryStreamWriterThe output stream to write the data to.