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

◆ GetKeyLength()

static int System.Security.Cryptography.CngKeyLite.GetKeyLength ( SafeNCryptKeyHandle keyHandle)
inlinestaticpackage

Definition at line 241 of file CngKeyLite.cs.

242 {
243 int result = 0;
244 global::Interop.NCrypt.ErrorCode errorCode = global::Interop.NCrypt.NCryptGetIntProperty(keyHandle, "PublicKeyLength", ref result);
245 if (errorCode != 0)
246 {
247 errorCode = global::Interop.NCrypt.NCryptGetIntProperty(keyHandle, "Length", ref result);
248 }
249 if (errorCode != 0)
250 {
251 throw errorCode.ToCryptographicException();
252 }
253 return result;
254 }

Referenced by System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.DeriveSecretAgreementHandle(), System.Security.Cryptography.ECCngKey.GenerateKey(), System.Security.Cryptography.ECCngKey.SetHandle(), System.Security.Cryptography.DSAImplementation.DSACng.SetKeyHandle(), and System.Security.Cryptography.RSAImplementation.RSACng.SetKeyHandle().