什么是公共密钥令牌,它是如何在装配强劲的名字来计算? [英] What is a public key token and how is it calculated in assembly strong names?

查看:203
本文介绍了什么是公共密钥令牌,它是如何在装配强劲的名字来计算?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是公共密钥令牌和它是如何在装配强劲的名字如何计算的?

What is a 'public key token' and how is it calculated in assembly strong names?

推荐答案

关于你的问题, 怎么回事计算,这是一个SHA1哈希值。

Regarding your question, "How is it calculated", it's an SHA1 hash.

从的点网博客

微软解决了公共密钥
膨胀通过使用
强命名程序集的公钥的哈希值问题。
这些哈希被称为公共
键的标记,而且是低8个字节
的强名称
装配的公钥的SHA1哈希的。 SHA1散列
160位(20字节)的散列,并且顶
12字节的哈希的仅仅是
在此算法丢弃。

Microsoft solves the "public key bloat" problem by using a hash of the strongly-named assembly's public key. These hashes are referred to as public key tokens, and are the low 8 bytes of the SHA1 hash of the strongly-named assembly's public key. SHA1 hashes are 160 bit (20 byte) hashes, and the top 12 bytes of the hash are simply discarded in this algorithm.

这篇关于什么是公共密钥令牌,它是如何在装配强劲的名字来计算?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆