2011-09-29 67 views
1

在C#中,我可以通過使用如何通過CryptoAPI中的證書公鑰獲取密鑰容器的信息?

public static CspKeyContainerInfo GetKeyConatinerInformation(X509Certificate2 certificate) 
{ 
    if (certificate == null) 
     throw new ArgumentNullException("certificate"); 

    ICspAsymmetricAlgorithm key = certificate.PublicKey.Key as ICspAsymmetricAlgorithm; 
     if (key == null) 
     throw new InvalidOperationException("Unknown key type"); 

    return key.CspKeyContainerInfo; 
} 

我想知道我如何通過使用C++和lib的CryptoAPI

回答

1

Here得到這個做,這是由穆尼爾IDRASSI編寫的程序。這將爲您提供您正在查找的信息。

也查找相關答案here

相關問題