Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetContentToSign()

static IEnumerable< Blob > System.Reflection.PortableExecutable.PEBuilder.GetContentToSign ( BlobBuilder peImage,
int peHeadersSize,
int peHeaderAlignment,
Blob strongNameSignatureFixup )
inlinestaticpackageinherited

Definition at line 319 of file PEBuilder.cs.

320 {
323 foreach (Blob blob in peImage.GetBlobs())
324 {
325 int blobStart = blob.Start;
326 int blobLength = blob.Length;
327 while (blobLength > 0)
328 {
329 if (remainingHeader > 0)
330 {
331 int length;
332 if (remainingHeaderToSign > 0)
333 {
335 yield return new Blob(blob.Buffer, blobStart, length);
337 }
338 else
339 {
340 length = Math.Min(remainingHeader, blobLength);
341 }
343 blobStart += length;
345 continue;
346 }
347 if (blob.Buffer == strongNameSignatureFixup.Buffer)
348 {
351 }
352 else
353 {
354 yield return new Blob(blob.Buffer, blobStart, blobLength);
355 }
356 break;
357 }
358 }
359 }
static uint Align(uint position, uint alignment)
static Blob GetPrefixBlob(Blob container, Blob blob)
Definition PEBuilder.cs:361
static Blob GetSuffixBlob(Blob container, Blob blob)
Definition PEBuilder.cs:366
readonly byte[] Buffer
Definition Blob.cs:5

References System.Reflection.Internal.BitArithmetic.Align(), System.Reflection.Metadata.Blob, System.Reflection.Metadata.Blob.Buffer, System.Reflection.PortableExecutable.PEBuilder.GetPrefixBlob(), System.Reflection.PortableExecutable.PEBuilder.GetSuffixBlob(), System.length, System.Reflection.Metadata.Blob.Length, System.Math.Min(), and System.Reflection.Metadata.Blob.Start.

Referenced by System.Reflection.PortableExecutable.PEBuilder.Sign().