2 instantiations of SafeLocalAllocHandle
System.Security (2)
system\security\cryptography\cryptoapi.cs (1)
2957SafeLocalAllocHandle invalidHandle = new SafeLocalAllocHandle(IntPtr.Zero);
system\security\cryptography\pkcs\envelopedpkcs7.cs (1)
679encryptParam.rgUnprotectedAttr = new SafeLocalAllocHandle(PkcsUtils.CreateCryptAttributes(unprotectedAttributes));
131 references to SafeLocalAllocHandle
System.Security (131)
system\security\cryptography\cryptoapi.cs (27)
1834SafeLocalAllocHandle LocalAlloc( 1849[In] SafeLocalAllocHandle pbCertEncoded, 1883[In,Out] SafeLocalAllocHandle pvData, 1909[In,Out] SafeLocalAllocHandle psz, 1941[In,Out] SafeLocalAllocHandle pvStructInfo, 1953[In,Out] SafeLocalAllocHandle pvStructInfo, 1963[In,Out] SafeLocalAllocHandle pbEncoded, 1973[In,Out] SafeLocalAllocHandle pbEncoded, 1989[In] SafeLocalAllocHandle pvKey, 2019[In, Out] SafeLocalAllocHandle pvData, 2317out SafeLocalAllocHandle decodedValue, 2320decodedValue = SafeLocalAllocHandle.InvalidHandle; 2325SafeLocalAllocHandle ptr = SafeLocalAllocHandle.InvalidHandle; 2357out SafeLocalAllocHandle decodedValue, 2360decodedValue = SafeLocalAllocHandle.InvalidHandle; 2365SafeLocalAllocHandle pbDecoded = SafeLocalAllocHandle.InvalidHandle; 2402SafeLocalAllocHandle pbEncoded = SafeLocalAllocHandle.InvalidHandle; 2436SafeLocalAllocHandle pbEncoded = SafeLocalAllocHandle.InvalidHandle; 2470internal static SafeLocalAllocHandle LocalAlloc(uint uFlags, IntPtr sizetdwBytes) { 2471SafeLocalAllocHandle safeLocalAllocHandle = CAPISafe.LocalAlloc(uFlags, sizetdwBytes); 2567[In] SafeLocalAllocHandle pvKey, 2955internal static SafeLocalAllocHandle InvalidHandle { 2957SafeLocalAllocHandle invalidHandle = new SafeLocalAllocHandle(IntPtr.Zero);
system\security\cryptography\cryptographicattribute.cs (1)
91internal CryptographicAttributeObjectCollection (SafeLocalAllocHandle pCryptAttributes) : this(pCryptAttributes.DangerousGetHandle()) {}
system\security\cryptography\pkcs\envelopedpkcs7.cs (33)
48internal SafeLocalAllocHandle pvEncryptionAuxInfo; 49internal SafeLocalAllocHandle rgpRecipients; 50internal SafeLocalAllocHandle rgCertEncoded; 51internal SafeLocalAllocHandle rgUnprotectedAttr; 52internal SafeLocalAllocHandle[] rgSubjectKeyIdentifier; 53internal SafeLocalAllocHandle[] rgszObjId; 54internal SafeLocalAllocHandle[] rgszKeyWrapObjId; 55internal SafeLocalAllocHandle[] rgKeyWrapAuxInfo; 56internal SafeLocalAllocHandle[] rgEphemeralIdentifier; 57internal SafeLocalAllocHandle[] rgszEphemeralObjId; 58internal SafeLocalAllocHandle[] rgUserKeyingMaterial; 59internal SafeLocalAllocHandle[] prgpEncryptedKey; 60internal SafeLocalAllocHandle[] rgpEncryptedKey; 355SafeLocalAllocHandle pbContent = SafeLocalAllocHandle.InvalidHandle; 411SafeLocalAllocHandle ceei = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_ENVELOPED_ENCODE_INFO)))); 594encryptParam.pvEncryptionAuxInfo = SafeLocalAllocHandle.InvalidHandle; 610SafeLocalAllocHandle pvAuxInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_RC2_AUX_INFO)))); 650encryptParam.rgCertEncoded = SafeLocalAllocHandle.InvalidHandle; 651encryptParam.rgUnprotectedAttr = SafeLocalAllocHandle.InvalidHandle; 652encryptParam.rgSubjectKeyIdentifier = new SafeLocalAllocHandle[recipients.Count]; 653encryptParam.rgszObjId = new SafeLocalAllocHandle[recipients.Count]; 656encryptParam.rgszKeyWrapObjId = new SafeLocalAllocHandle[cKeyAgree]; 657encryptParam.rgKeyWrapAuxInfo = new SafeLocalAllocHandle[cKeyAgree]; 658encryptParam.rgEphemeralIdentifier = new SafeLocalAllocHandle[cKeyAgree]; 659encryptParam.rgszEphemeralObjId = new SafeLocalAllocHandle[cKeyAgree]; 660encryptParam.rgUserKeyingMaterial = new SafeLocalAllocHandle[cKeyAgree]; 661encryptParam.prgpEncryptedKey = new SafeLocalAllocHandle[cKeyAgree]; 662encryptParam.rgpEncryptedKey = new SafeLocalAllocHandle[cKeyAgree]; 750SafeLocalAllocHandle pbData = SafeLocalAllocHandle.InvalidHandle; 936SafeLocalAllocHandle pbKeyId = SafeLocalAllocHandle.InvalidHandle;
system\security\cryptography\pkcs\pkcs9attribute.cs (2)
108SafeLocalAllocHandle pbDecoded = null; 127SafeLocalAllocHandle pbSigningTime = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(Int64))));
system\security\cryptography\pkcs\pkcsmisc.cs (5)
80SafeLocalAllocHandle pbCertNameInfo = SafeLocalAllocHandle.InvalidHandle; 321SafeLocalAllocHandle pKeyInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CERT_PUBLIC_KEY_INFO)))); 337SafeLocalAllocHandle pbParameters = SafeLocalAllocHandle.InvalidHandle;
system\security\cryptography\pkcs\pkcsutils.cs (23)
77SafeLocalAllocHandle pPeex = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.PROV_ENUMALGS_EX)))); 134SafeLocalAllocHandle pbAlgorithm = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbAlgorithm)); 154out SafeLocalAllocHandle pvData, 157pvData = SafeLocalAllocHandle.InvalidHandle; 227SafeLocalAllocHandle pbEncoded = SafeLocalAllocHandle.InvalidHandle; 301SafeLocalAllocHandle pbCmsgSignerInfo = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbCmsgSignerInfo)); 336SafeLocalAllocHandle pbUnprotectedAttr = SafeLocalAllocHandle.InvalidHandle; 364SafeLocalAllocHandle ptr = SafeLocalAllocHandle.InvalidHandle; 395SafeLocalAllocHandle pbDecoded = null; 419SafeLocalAllocHandle pbDecoded = null; 646SafeLocalAllocHandle pCryptAttributes = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(totalLength)); 763SafeLocalAllocHandle pbDataIssuer = 772SafeLocalAllocHandle pbDataSerialNumber = 800SafeLocalAllocHandle pbData = SafeLocalAllocHandle.InvalidHandle; 952internal static unsafe SafeLocalAllocHandle CreateEncodedCertBlob (X509Certificate2Collection certificates) { 953SafeLocalAllocHandle certBlob = SafeLocalAllocHandle.InvalidHandle; 1072SafeLocalAllocHandle pKeyProvInfo = CAPI.LocalAlloc(CAPI.LPTR, 1080SafeLocalAllocHandle pSignatureAlgorithm = CAPI.LocalAlloc(CAPI.LPTR,
system\security\cryptography\pkcs\recipientinfo.cs (9)
39private SafeLocalAllocHandle m_pCmsgRecipientInfo; 46internal RecipientInfo (RecipientInfoType recipientInfoType, RecipientSubType recipientSubType, SafeLocalAllocHandle pCmsgRecipientInfo, Object cmsgRecipientInfo, uint index) { 84internal SafeLocalAllocHandle pCmsgRecipientInfo { 112internal unsafe KeyTransRecipientInfo (SafeLocalAllocHandle pRecipientInfo, CAPI.CERT_INFO certInfo, uint index) : base(RecipientInfoType.KeyTransport, RecipientSubType.Pkcs7KeyTransport, pRecipientInfo, certInfo, index) { 127internal KeyTransRecipientInfo (SafeLocalAllocHandle pRecipientInfo, CAPI.CMSG_KEY_TRANS_RECIPIENT_INFO keyTrans, uint index) : base(RecipientInfoType.KeyTransport, RecipientSubType.CmsKeyTransport, pRecipientInfo, keyTrans, index) { 220internal KeyAgreeRecipientInfo (SafeLocalAllocHandle pRecipientInfo, CAPI.CMSG_KEY_AGREE_CERT_ID_RECIPIENT_INFO certIdRecipient, uint index, uint subIndex) : base(RecipientInfoType.KeyAgreement, RecipientSubType.CertIdKeyAgreement, pRecipientInfo, certIdRecipient, index) { 229internal KeyAgreeRecipientInfo (SafeLocalAllocHandle pRecipientInfo, CAPI.CMSG_KEY_AGREE_PUBLIC_KEY_RECIPIENT_INFO publicKeyRecipient, uint index, uint subIndex) : base(RecipientInfoType.KeyAgreement, RecipientSubType.PublicKeyAgreement, pRecipientInfo, publicKeyRecipient, index) { 419SafeLocalAllocHandle pbCmsRecipientInfo; 454SafeLocalAllocHandle pbCertInfo;
system\security\cryptography\pkcs\signedpkcs7.cs (3)
303SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO)))); 308SafeLocalAllocHandle pEncodedBagOfCerts = PkcsUtils.CreateEncodedCertBlob(bagOfCerts); 376SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO))));
system\security\cryptography\pkcs\signerinfo.cs (16)
33private SafeLocalAllocHandle m_pbCmsgSignerInfo; 45internal SignerInfo (SignedCms signedCms, SafeLocalAllocHandle pbCmsgSignerInfo) { 64SafeLocalAllocHandle pbCmsgSignerInfo = SafeLocalAllocHandle.InvalidHandle; 303SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO)))); 348SafeLocalAllocHandle pbParameters = SafeLocalAllocHandle.InvalidHandle; 466SafeLocalAllocHandle pbParentEncodedSignerInfo = SafeLocalAllocHandle.InvalidHandle; 523SafeLocalAllocHandle pbCmsgCmsSignerInfo = SafeLocalAllocHandle.InvalidHandle; 526SafeLocalAllocHandle pbCmsgSignerInfo = SafeLocalAllocHandle.InvalidHandle; 589SafeLocalAllocHandle pbCounterSignatureValue = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbCounterSignatureValue)); 608SafeLocalAllocHandle pNewAttr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_ATTRIBUTE)))); 748SafeLocalAllocHandle pbCmsgSignerInfo = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbCmsgSignerInfo));
system\security\cryptography\x509\x509utils.cs (12)
127internal static SafeLocalAllocHandle StringToAnsiPtr (string s) { 130SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(arr.Length)); 144SafeLocalAllocHandle ptr = SafeLocalAllocHandle.InvalidHandle; 237SafeLocalAllocHandle pszOid = StringToAnsiPtr(value); 254internal static SafeLocalAllocHandle CopyOidsToUnmanagedMemory (OidCollection oids) { 255SafeLocalAllocHandle safeLocalAllocHandle = SafeLocalAllocHandle.InvalidHandle; 315SafeLocalAllocHandle applicationPolicyHandle = SafeLocalAllocHandle.InvalidHandle; 324SafeLocalAllocHandle certificatePolicyHandle = SafeLocalAllocHandle.InvalidHandle;