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

◆ PositiveBigIntegerFromByteArray()

static BigInteger Internal.Cryptography.Pal.FindPal.PositiveBigIntegerFromByteArray ( byte[] bytes)
inlinestaticpackage

Definition at line 236 of file FindPal.cs.

237 {
238 if (bytes.Length == 0 || bytes[^1] < 128)
239 {
240 return new BigInteger(bytes);
241 }
242 byte[] array = new byte[bytes.Length + 1];
243 Buffer.BlockCopy(bytes, 0, array, 0, bytes.Length);
244 return new BigInteger(array);
245 }
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
Definition Buffer.cs:102

References System.array, System.Buffer.BlockCopy(), and System.bytes.

Referenced by Internal.Cryptography.Pal.FindPal.FindBySerialNumber(), and Internal.Cryptography.Pal.FindPal.FindFromCollection().