开发者

Extracting private key from a strong name file?

开发者 https://www.devze.com 2023-01-10 12:54 出处:网络
As the title states, does anyone know how to ex开发者_如何转开发tract the private key from an snk file? We want to use the private key from the StrongName for encryption purposes. I read in:

As the title states, does anyone know how to ex开发者_如何转开发tract 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消