DSACryptoServiceProvider.CspKeyContainerInfo 属性

定义

获取描述有关加密密钥对的附加信息的 CspKeyContainerInfo 对象。Gets a CspKeyContainerInfo object that describes additional information about a cryptographic key pair.

public:
 property System::Security::Cryptography::CspKeyContainerInfo ^ CspKeyContainerInfo { System::Security::Cryptography::CspKeyContainerInfo ^ get(); };
[System.Runtime.InteropServices.ComVisible(false)]
public System.Security.Cryptography.CspKeyContainerInfo CspKeyContainerInfo { get; }
member this.CspKeyContainerInfo : System.Security.Cryptography.CspKeyContainerInfo
Public ReadOnly Property CspKeyContainerInfo As CspKeyContainerInfo

属性值

描述有关加密密钥对的附加信息的 CspKeyContainerInfo 对象。A CspKeyContainerInfo object that describes additional information about a cryptographic key pair.

实现

属性

注解

CspKeyContainerInfo使用属性可检索有关加密密钥对的附加信息。Use the CspKeyContainerInfo property to retrieve additional information about a cryptographic key pair. 返回CspKeyContainerInfo的对象描述密钥是否可导出,并指定密钥容器名称、有关提供程序的信息以及其他信息。The returned CspKeyContainerInfo object describes whether the key is exportable, and specifies the key container name, information about the provider, and other information.

在生成随机密钥的情况下,在调用使用密钥的方法之前,不会创建密钥容器。In cases where a random key is generated, a key container will not be created until you call a method that uses the key. 如果尚未创建密钥CspKeyContainerInfo容器,则CspKeyContainerInfo属性返回的对象的某些属性将引发。 CryptographicExceptionSome properties of the CspKeyContainerInfo object returned by the CspKeyContainerInfo property will throw a CryptographicException if a key container has not been created. 若要确保已创建密钥容器,请先调用SignData VerifyDataSignHash VerifyHash、、等方法,然后再调用CspKeyContainerInfo属性。To make sure that a key container has been created, call a method such as SignData, SignHash, VerifyData, VerifyHash, and so on, before you call the CspKeyContainerInfo property.

适用于

另请参阅