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

◆ AppendPrivateKeyInfo()

void Internal.Cryptography.Pal.CertificatePal.AppendPrivateKeyInfo ( StringBuilder sb)
inline

Implements Internal.Cryptography.ICertificatePal.

Definition at line 320 of file CertificatePal.cs.

321 {
322 if (!HasPrivateKey)
323 {
324 return;
325 }
326 sb.AppendLine();
327 sb.AppendLine();
328 sb.AppendLine("[Private Key]");
330 try
331 {
333 if (privateKeyCsp != null)
334 {
336 }
337 }
339 {
340 }
341 if (cspKeyContainerInfo == null)
342 {
343 return;
344 }
345 sb.AppendLine().Append(" Key Store: ").Append(cspKeyContainerInfo.MachineKeyStore ? "Machine" : "User");
346 sb.AppendLine().Append(" Provider Name: ").Append(cspKeyContainerInfo.ProviderName);
347 sb.AppendLine().Append(" Provider type: ").Append(cspKeyContainerInfo.ProviderType);
348 sb.AppendLine().Append(" Key Spec: ").Append(cspKeyContainerInfo.KeyNumber);
349 sb.AppendLine().Append(" Key Container Name: ").Append(cspKeyContainerInfo.KeyContainerName);
350 try
351 {
352 string uniqueKeyContainerName = cspKeyContainerInfo.UniqueKeyContainerName;
353 sb.AppendLine().Append(" Unique Key Container Name: ").Append(uniqueKeyContainerName);
354 }
356 {
357 }
359 {
360 }
361 try
362 {
363 bool hardwareDevice = cspKeyContainerInfo.HardwareDevice;
364 sb.AppendLine().Append(" Hardware Device: ").Append(hardwareDevice);
365 }
367 {
368 }
369 try
370 {
371 bool removable = cspKeyContainerInfo.Removable;
372 sb.AppendLine().Append(" Removable: ").Append(removable);
373 }
375 {
376 }
377 try
378 {
379 bool @protected = cspKeyContainerInfo.Protected;
380 sb.AppendLine().Append(" Protected: ").Append(@protected);
381 }
383 {
384 }
386 {
387 }
388 }
StringBuilder Append(char value, int repeatCount)

References System.Text.StringBuilder.Append(), System.Text.StringBuilder.AppendLine(), Internal.Cryptography.Pal.CertificatePal.GetPrivateKeyCsp(), and Internal.Cryptography.Pal.CertificatePal.HasPrivateKey.