Example #1
0
 private void Reset(uint originatorChoice, uint version, System.Security.Cryptography.CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO encryptedKeyInfo, uint subIndex)
 {
     this.m_encryptedKeyInfo     = encryptedKeyInfo;
     this.m_originatorChoice     = originatorChoice;
     this.m_version              = (int)version;
     this.m_originatorIdentifier = null;
     this.m_userKeyMaterial      = new byte[0];
     this.m_encryptionAlgorithm  = null;
     this.m_recipientIdentifier  = null;
     this.m_encryptedKey         = new byte[0];
     this.m_date = DateTime.MinValue;
     this.m_otherKeyAttribute = null;
     this.m_subIndex          = subIndex;
 }
 private void Reset(uint originatorChoice, uint version, System.Security.Cryptography.CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO encryptedKeyInfo, uint subIndex)
 {
     this.m_encryptedKeyInfo = encryptedKeyInfo;
     this.m_originatorChoice = originatorChoice;
     this.m_version = (int) version;
     this.m_originatorIdentifier = null;
     this.m_userKeyMaterial = new byte[0];
     this.m_encryptionAlgorithm = null;
     this.m_recipientIdentifier = null;
     this.m_encryptedKey = new byte[0];
     this.m_date = DateTime.MinValue;
     this.m_otherKeyAttribute = null;
     this.m_subIndex = subIndex;
 }
Example #3
0
 internal KeyAgreeRecipientInfo(System.Security.Cryptography.SafeLocalAllocHandle pRecipientInfo, System.Security.Cryptography.CAPI.CMSG_KEY_AGREE_PUBLIC_KEY_RECIPIENT_INFO publicKeyRecipient, uint index, uint subIndex) : base(RecipientInfoType.KeyAgreement, RecipientSubType.PublicKeyAgreement, pRecipientInfo, publicKeyRecipient, index)
 {
     System.Security.Cryptography.CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO encryptedKeyInfo = (System.Security.Cryptography.CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO)Marshal.PtrToStructure(Marshal.ReadIntPtr(new IntPtr(((long)publicKeyRecipient.rgpRecipientEncryptedKeys) + (subIndex * Marshal.SizeOf(typeof(IntPtr))))), typeof(System.Security.Cryptography.CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_INFO));
     this.Reset(2, publicKeyRecipient.dwVersion, encryptedKeyInfo, subIndex);
 }