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

◆ ExponentAsBytes()

static byte[] Internal.NativeCrypto.CapiHelper.ExponentAsBytes ( uint exponent)
inlinestaticprivate

Definition at line 376 of file CapiHelper.cs.

377 {
378 if (exponent > 255)
379 {
380 if (exponent > 65535)
381 {
382 if (exponent > 16777215)
383 {
384 return new byte[4]
385 {
386 (byte)(exponent >> 24),
387 (byte)(exponent >> 16),
388 (byte)(exponent >> 8),
389 (byte)exponent
390 };
391 }
392 return new byte[3]
393 {
394 (byte)(exponent >> 16),
395 (byte)(exponent >> 8),
396 (byte)exponent
397 };
398 }
399 return new byte[2]
400 {
401 (byte)(exponent >> 8),
402 (byte)exponent
403 };
404 }
405 return new byte[1] { (byte)exponent };
406 }

Referenced by Internal.NativeCrypto.CapiHelper.ToRSAParameters().