KeyContainerPermissionFlags Enumeration
TOC
Collapse the table of content
Expand the table of content

KeyContainerPermissionFlags Enumeration

 

Specifies the type of key container access allowed.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:   System.Security.Permissions
Assembly:  mscorlib (in mscorlib.dll)

[SerializableAttribute]
[FlagsAttribute]
[ComVisibleAttribute(true)]
public enum KeyContainerPermissionFlags

Member nameDescription
AllFlags

Create, decrypt, delete, and open a key container; export and import a key; sign files using a key; and view and change the access control list for a key container.

ChangeAcl

Change the access control list (ACL) for a key container.

Create

Create a key container.

Decrypt

Decrypt a key container.

Delete

Delete a key container.

Export

Export a key from a key container.

Import

Import a key into a key container.

NoFlags

No access to a key container.

Open

Open a key container and use the public key.

Sign

Sign a file using a key.

ViewAcl

View the access control list (ACL) for a key container.

This enumeration is used by members of the KeyContainerPermissionAccessEntry class.

System_CAPS_cautionCaution

Many of these flags can have powerful effects and should be granted only to highly trusted code.

The most powerful of the flags are Create, Delete, Import, Export, Sign, Decrypt, and AllFlags. For specific threats that the use of these flags can present, see the member descriptions.

The following code example shows the use of the KeyContainerPermissionFlags enumeration.

// Create a KeyContainerPermission with the right 
// to open the key container.
KeyContainerPermission keyContainerPerm = new
     KeyContainerPermission(KeyContainerPermissionFlags.Open);

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft