1
我正在關注Verify the Digital Signatures of XML Documents tutorial並惹上麻煩。如何從智能卡中刪除RSA密鑰對
現在我的智能卡包含三個額外的鍵值對,它們是多餘的,我必須刪除它們。
MSDN教程How to: Store Asymmetric Keys in a Key Container包含解釋如何從容器中刪除密鑰,但不解釋如何刪除現有的密鑰。
// Create a new CspParameters object to specify
// a key container.
CspParameters cspParams = new CspParameters(1, "ActivClient Cryptographic Service Provider");
cspParams.Flags = CspProviderFlags.UseDefaultKeyContainer;
// Create a new RSA signing key and save it in the container.
RSACryptoServiceProvider rsaKey = new RSACryptoServiceProvider(cspParams);
rsaKey.PersistKeyInCsp = false;
然後程序會與下面的錯誤迴應:安全令牌沒有對額外的容器的可用存儲空間,包含下面的代碼
當我重新啓動程序。
我是新來的(智能卡),所以我完全失去了。請幫忙。
可以查看圖片[here](http://img845.imageshack.us/img845/4280/keypair.jpg)。 –
請使用標籤,而不要在「C#」前添加標題。 –