• Home
  • Raw
  • Download

Lines Matching refs:RandomSN

63   OUT RANDOM_SERIAL_NUMBER   *RandomSN  in GenerateUsbSNBySeed()  argument
69 if (RandomSN == NULL) { in GenerateUsbSNBySeed()
72 ZeroMem (RandomSN, sizeof (RANDOM_SERIAL_NUMBER)); in GenerateUsbSNBySeed()
77 RandomSN->Data = (Tmp << 32) | Seed; in GenerateUsbSNBySeed()
78 UnicodeSPrint (RandomSN->UnicodeSN, SERIAL_NUMBER_SIZE * sizeof (CHAR16), L"%lx", RandomSN->Data); in GenerateUsbSNBySeed()
79 RandomSN->Magic = RANDOM_MAGIC; in GenerateUsbSNBySeed()
91 RANDOM_SERIAL_NUMBER RandomSN; in GenerateUsbSN() local
96 ZeroMem (&RandomSN, sizeof (RANDOM_SERIAL_NUMBER)); in GenerateUsbSN()
102 RandomSN.Data = (Tmp << 32) | Seed; in GenerateUsbSN()
103 UnicodeSPrint (RandomSN.UnicodeSN, SERIAL_NUMBER_SIZE * sizeof (CHAR16), L"%lx", RandomSN.Data); in GenerateUsbSN()
104 StrCpyS (UnicodeSN, SERIAL_NUMBER_SIZE * sizeof (CHAR16), RandomSN.UnicodeSN); in GenerateUsbSN()
116 RANDOM_SERIAL_NUMBER RandomSN; in AssignUsbSN() local
137 ZeroMem (&RandomSN, sizeof (RANDOM_SERIAL_NUMBER)); in AssignUsbSN()
138 AsciiStrToUnicodeStr (AsciiCmd, RandomSN.UnicodeSN); in AssignUsbSN()
139 StrCpyS (UnicodeSN, SERIAL_NUMBER_SIZE * sizeof (CHAR16), RandomSN.UnicodeSN); in AssignUsbSN()
155 RANDOM_SERIAL_NUMBER *RandomSN; in LoadSNFromBlock() local
193 RandomSN = (RANDOM_SERIAL_NUMBER *)DataPtr; in LoadSNFromBlock()
194 if (RandomSN->Magic == RANDOM_MAGIC) { in LoadSNFromBlock()
198 UnicodeSPrint (UnicodeStr, SERIAL_NUMBER_SIZE * sizeof (CHAR16), L"%lx", RandomSN->Data); in LoadSNFromBlock()
199 if (StrLen (RandomSN->UnicodeSN) != StrLen (UnicodeStr)) { in LoadSNFromBlock()
202 if (StrnCmp (RandomSN->UnicodeSN, UnicodeStr, StrLen (UnicodeStr)) != 0) { in LoadSNFromBlock()
207 Status = GenerateUsbSNBySeed (Seed, RandomSN); in LoadSNFromBlock()
225 CopyMem (UnicodeSN, RandomSN->UnicodeSN, SERIAL_NUMBER_SIZE * sizeof (CHAR16)); in LoadSNFromBlock()
242 RANDOM_SERIAL_NUMBER *RandomSN; in StoreSNToBlock() local
267 RandomSN = (RANDOM_SERIAL_NUMBER *)DataPtr; in StoreSNToBlock()
268 RandomSN->Magic = RANDOM_MAGIC; in StoreSNToBlock()
269 …StrnCpyS (RandomSN->UnicodeSN, SERIAL_NUMBER_SIZE * sizeof (CHAR16), UnicodeSN, StrSize (UnicodeSN… in StoreSNToBlock()
270 RandomSN->Data = StrHexToUint64 (RandomSN->UnicodeSN); in StoreSNToBlock()
274 UnicodeSPrint (UnicodeStr, SERIAL_NUMBER_SIZE * sizeof (CHAR16), L"%lx", RandomSN->Data); in StoreSNToBlock()
275 if (StrLen (RandomSN->UnicodeSN) != StrLen (UnicodeStr)) { in StoreSNToBlock()
276 DEBUG ((DEBUG_ERROR, "#%a, %d, strlen:%d, %d\n", __func__, __LINE__, StrLen (RandomSN->UnicodeSN), … in StoreSNToBlock()
280 if (StrnCmp (RandomSN->UnicodeSN, UnicodeStr, StrLen (UnicodeStr)) != 0) { in StoreSNToBlock()
281 DEBUG ((DEBUG_ERROR, "#%a, %d, %s, %s\n", __func__, __LINE__, RandomSN->UnicodeSN, UnicodeStr)); in StoreSNToBlock()