internal RecipientInfo(RecipientInfoType recipientInfoType, RecipientSubType recipientSubType, SafeLocalAllocHandle pCmsgRecipientInfo, object cmsgRecipientInfo, uint index) { if (recipientInfoType < RecipientInfoType.Unknown || recipientInfoType > RecipientInfoType.KeyAgreement) recipientInfoType = RecipientInfoType.Unknown; if (recipientSubType < RecipientSubType.Unknown || recipientSubType > RecipientSubType.PublicKeyAgreement) recipientSubType = RecipientSubType.Unknown; this.m_recipentInfoType = recipientInfoType; this.m_recipientSubType = recipientSubType; this.m_pCmsgRecipientInfo = pCmsgRecipientInfo; this.m_cmsgRecipientInfo = cmsgRecipientInfo; this.m_index = index; }
internal RecipientInfo(RecipientInfoType recipientInfoType, RecipientSubType recipientSubType, System.Security.Cryptography.SafeLocalAllocHandle pCmsgRecipientInfo, object cmsgRecipientInfo, uint index) { if ((recipientInfoType < RecipientInfoType.Unknown) || (recipientInfoType > RecipientInfoType.KeyAgreement)) { recipientInfoType = RecipientInfoType.Unknown; } if ((recipientSubType < RecipientSubType.Unknown) || (recipientSubType > RecipientSubType.PublicKeyAgreement)) { recipientSubType = RecipientSubType.Unknown; } this.m_recipentInfoType = recipientInfoType; this.m_recipientSubType = recipientSubType; this.m_pCmsgRecipientInfo = pCmsgRecipientInfo; this.m_cmsgRecipientInfo = cmsgRecipientInfo; this.m_index = index; }
internal RecipientInfo(RecipientInfoType type, RecipientInfoPal pal) { #if DEBUG switch (type) { case RecipientInfoType.KeyTransport: Debug.Assert(pal is KeyTransRecipientInfoPal); break; case RecipientInfoType.KeyAgreement: Debug.Assert(pal is KeyAgreeRecipientInfoPal); break; default: Debug.Fail($"Illegal recipientInfoType: {type}"); break; } #endif Type = type; Pal = pal; }
// constructors // documented as protected at http://longhorn.msdn.microsoft.com // but not present in the 1.2 beta SDK internal RecipientInfo (RecipientInfoType recipInfoType) { _type = recipInfoType; }