将publickey转换为整数 [英] convert publickey to integer

查看:113
本文介绍了将publickey转换为整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何将以下公钥转换为整数.

这些是RSAKeyValue:

how will i convert the following public key to integer.

these are the RSAKeyValue:

Modulus: yf4I7PVef43rZ2NdPFA5FQFb/y/k/5Awqrwc+/VDUimthRg4C5K2P6EUhU5n2m4HUiz102LIuwsYDYuyHwG3VUbAb4zjqxiOwrSpsHfCvgOdLsb4DBrXFFGp5kMtoZrDzl84tnDlyYgy8v3o5Qp2eeQgDaau2PhYUxoco6IArHU=

Exponent:AQAB


我想做这个bcoz,我想将它的xor与另一个整数值...

请在这里帮助...

thnx ...


i want to do this bcoz i want to take its xor with another integer value...

plz help here...

thnx...

推荐答案

好吧,如果您考虑密钥中字符的数量和类型,就不可能直接转换为整数.但是,您可以编写将其缩减为整数的转换.例如,依次获取每个字符的二进制值并将它们加在一起以将其减小为32或64位值.但是请记住,这样的值不太可能是唯一的.
Well if you consider the number and type of characters that are in the key it''s unlikely that you can do a straight conversion to an integer. You could, however write a conversion that reduces it to an integer; for example take the binary value of each character in turn and add them together to reduce it to a 32 or 64 bit value. Remember, however that such a value is not likely to be unique.


如果只需要从字符串生成派生整数,为什么不调用返回整数的GetHashcode()方法呢? ?
If you just need to generate a derivative integer from a string, why not call the GetHashcode() method which returns an integer?


在我看来,这类似于Base-64编码. Google Base64,看看您能得到什么.
This looks like Base-64 encoding to me. Google Base64 and see what you get.


这篇关于将publickey转换为整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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