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

◆ ToUnsignedIntegerBytes() [2/4]

static byte[] System.Security.Cryptography.KeyBlobHelpers.ToUnsignedIntegerBytes ( this ReadOnlyMemory< byte > memory)
inlinestaticpackage

Definition at line 25 of file KeyBlobHelpers.cs.

26 {
27 ReadOnlySpan<byte> span = memory.Span;
28 if (span.Length > 1 && span[0] == 0)
29 {
30 return span.Slice(1).ToArray();
31 }
32 return span.ToArray();
33 }

References System.ReadOnlySpan< T >.Length, System.ReadOnlySpan< T >.Slice(), System.ReadOnlyMemory< T >.Span, and System.ReadOnlySpan< T >.ToArray().