As the title states, does anyone know how to extract the private key from an snk file? We want to use the private key from the StrongName for encryption purposes. I read in:
http://msdn.microsoft.com/en-us/library/k5b5tt23(VS.80).aspx that sn -o key.snk will extract both the private/public key if they exist in the file but i tried it and its just a long CSV formatted string with no distinction between what is the private key and what is the public key.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In the document you link, next to the -o flag, it says:
If the infile contains a key pair with a private key, the private key is also extracted.
Are you certain there is a private key in the file?
You can run sn -p key.snk
to get the public key, and compare that to the output of sn -o key.snk
- if they are the same, the key file only has a public key, if not, the difference is the private key.