【问题标题】:bnpFromString js equivalent of php Math_BigInteger?bnpFromString js 相当于 php Math_BigInteger?
【发布时间】:2015-01-27 07:05:03
【问题描述】:

BigInteger - 对 RSA 加密有用的子集。 JS 库 - Tom Wu 和 PHP 库 - phpseclib 在 Js Lib 中输入可以传递一个数组,例如——http://js.do/code/biginteger 作为 php 库传递相同的数组并获得相同的结果? 如果php库要传递这样一个数组

new Math_BigInteger(implode('', $buffer), 256);

结果会不一样

12**557**......

请帮帮我:)

【问题讨论】:

    标签: javascript php rsa phpseclib


    【解决方案1】:

    这是你想要的吗?

    new Math_BigInteger(implode('', array_map('chr', $buffer)), 256);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-16
      • 2011-08-21
      • 2012-10-10
      • 1970-01-01
      • 2016-01-01
      • 2012-12-03
      相关资源
      最近更新 更多