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

◆ EncodeOID()

static byte[] System.Security.Cryptography.CryptoConfig.EncodeOID ( string str)
inlinestatic

Definition at line 363 of file CryptoConfig.cs.

364 {
365 if (str == null)
366 {
367 throw new ArgumentNullException("str");
368 }
369 string[] array = str.Split('.');
370 uint[] array2 = new uint[array.Length];
371 for (int i = 0; i < array.Length; i++)
372 {
374 }
375 if (array2.Length < 2)
376 {
377 throw new CryptographicUnexpectedOperationException(System.SR.Cryptography_InvalidOID);
378 }
379 uint value = array2[0] * 40 + array2[1];
380 int index = 2;
382 for (int j = 2; j < array2.Length; j++)
383 {
385 }
386 byte[] array3 = new byte[index];
387 int index2 = 2;
389 for (int k = 2; k < array2.Length; k++)
390 {
392 }
393 if (index2 - 2 > 127)
394 {
395 throw new CryptographicUnexpectedOperationException(System.SR.Cryptography_Config_EncodedOIDError);
396 }
397 array3[0] = 6;
398 array3[1] = (byte)(index2 - 2);
399 return array3;
400 }
static CultureInfo InvariantCulture
static string Cryptography_InvalidOID
Definition SR.cs:62
static string Cryptography_Config_EncodedOIDError
Definition SR.cs:46
Definition SR.cs:7
static void EncodeSingleOidNum(uint value, byte[] destination, ref int index)

References System.array, System.SR.Cryptography_Config_EncodedOIDError, System.SR.Cryptography_InvalidOID, System.Security.Cryptography.CryptoConfig.EncodeSingleOidNum(), System.index, System.index2, System.Globalization.CultureInfo.InvariantCulture, System.str, and System.value.