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

◆ FriendlyName

string? System.Security.Cryptography.Oid.FriendlyName
getset

Definition at line 31 of file Oid.cs.

32 {
33 get
34 {
35 if (!_hasInitializedFriendlyName && _value != null)
36 {
37 _friendlyName = OidLookup.ToFriendlyName(_value, _group, fallBackToAllGroups: true);
39 }
40 return _friendlyName;
41 }
42 set
43 {
45 {
46 if ((_friendlyName != null && !_friendlyName.Equals(value, StringComparison.Ordinal)) || (_friendlyName == null && value != null))
47 {
48 throw new PlatformNotSupportedException(System.SR.Cryptography_Oid_SetOnceFriendlyName);
49 }
50 return;
51 }
52 if (value != null)
53 {
54 string text = OidLookup.ToOid(value, _group, fallBackToAllGroups: true);
55 if (text != null)
56 {
57 if (_value == null)
58 {
59 _value = text;
60 }
61 else if (!_value.Equals(text, StringComparison.Ordinal))
62 {
63 throw new PlatformNotSupportedException(System.SR.Cryptography_Oid_SetOnceValue);
64 }
65 }
66 }
69 }
70 }
static string ToOid(string friendlyName, OidGroup oidGroup, bool fallBackToAllGroups)
Definition OidLookup.cs:39
static string ToFriendlyName(string oid, OidGroup oidGroup, bool fallBackToAllGroups)
Definition OidLookup.cs:20
static string Cryptography_Oid_SetOnceFriendlyName
Definition SR.cs:20
static string Cryptography_Oid_SetOnceValue
Definition SR.cs:18
Definition SR.cs:7
readonly OidGroup _group
Definition Oid.cs:13

Referenced by System.Security.Cryptography.X509Certificates.ECDsaX509SignatureGenerator.BuildPublicKey(), System.Security.Cryptography.ECCngKey.GenerateKey(), System.Security.Cryptography.ECDiffieHellmanCng.GenerateKey(), System.Security.Cryptography.ECDsaCng.GenerateKey(), Internal.Cryptography.CngAlgorithmCore.GetOrGenerateKey(), System.Security.Cryptography.CngKey.GetPropertyFromNamedCurve(), System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.ImportParameters(), System.Security.Cryptography.ECDsaImplementation.ECDsaCng.ImportParameters(), System.Security.Cryptography.ECDiffieHellmanCng.ImportParameters(), System.Security.Cryptography.ECDsaCng.ImportParameters(), System.Security.Cryptography.Oids.InitializeOid(), System.Security.Cryptography.X509Certificates.X509Certificate2.ToString(), System.Security.Cryptography.ECCurve.Validate(), and System.Security.Cryptography.EccKeyFormatHelper.WriteEcParameters().