人生是一场不能存盘的RPG,我只能尽量多搞几个Screenshot

June 13, 2006

获取Public Key 信息

Filed under: Code snippets

//==得到assembly中的 pubic key
byte[] currentKey = AssemblyName.GetAssemblyName(”myAssembly.dll”).GetPublicKey();

//==得到key pair 文件中的 pubic key
FileStream keyStream = File.OpenRead(”mykey.snk”);
byte[] newKey = new System.Reflection.StrongNameKeyPair(keyStream).PublicKey;

//==使用 sn.exe

得到public key
sn -p my.keys my.publickey

查看public key内容
sn -tp my.publickey

Comments »

The URI to TrackBack this entry is: http://recordsome.blogsome.com/2006/06/13/p106/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham