PrivateKey.IsHardwareDevice method
[The IsHardwareDevice method is available for use in the operating systems specified in the Requirements section. Instead, use the X509Certificate2.PrivateKey Property in the System.Security.Cryptography.X509Certificates namespace.]
The IsHardwareDevice method returns a Boolean value that indicates whether the private key is stored in a hardware device.
Syntax
PrivateKey.IsHardwareDevice()
Parameters
This method has no parameters.
Return value
If true, the private key is stored in a hardware device.
Remarks
The return value of this method is dependent on the cryptographic service provider (CSP) used. This method will return a trustworthy value if a Microsoft CSP is used. If the CSP is not a Microsoft CSP, the return value cannot be trusted to be accurate.
Requirements
Requirement | Value |
---|---|
Redistributable |
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP |
DLL |
|
See also