Szerkesztés

Megosztás a következőn keresztül:


Recipients object

[The Recipients object is available for use in the operating systems specified in the Requirements section. Instead, use the CmsRecipientCollection Class in the System.Security.Cryptography.Pkcs namespace.]

The Recipients object represents a collection of Certificate objects. Each object represents an intended recipient of the enveloped message. Data in an EnvelopedData object is encrypted with a symmetric session key, and that symmetric session key is then itself encrypted for each recipient by using the public key from that intended recipient's certificate. A recipient with access to the private key associated with a certificate's public key can decrypt the session key and use the decrypted session key to decrypt the actual data.

When to use

The Recipients object is used to perform the following tasks:

  • Add or remove a Certificate object from the collection.
  • Retrieve the number of certificates in the collection.
  • Retrieve a specific Recipients object from the collection.
  • Iterate through the collection.

Members

The Recipients object has these types of members:

Methods

The Recipients object has these methods.

Method Description
Add Adds a Certificate object to the collection.
Clear Removes all Certificate objects from the collection.
Remove Removes a Certificate object from the collection.

 

Properties

The Recipients object has these properties.

Property Access type Description
_NewEnum
Read-only
Retrieves an IEnumVARIANT interface on an object that can be used to enumerate the collection. This property is hidden within Visual Basic Scripting Edition (VBScript).
Count
The number of objects in the Recipients collection.
Item
An indexed object in the collection. This is the default property.

 

Remarks

The Recipients object cannot be created.

Requirements

Requirement Value
Redistributable
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP
DLL
Capicom.dll

See also

Cryptography Objects