.BigInteger

 

 

RSA and ECC in JavaScript http://www-cs-students.stanford.edu/~tjw/jsbn/

 

Source Code

The API for the jsbn library closely resembles that of the java.math.BigInteger class in Java. For example:

  x = new BigInteger("abcd1234", 16);
  y = new BigInteger("beef", 16);
  z = x.mod(y);
  alert(z.toString(16));

will print b60c.

 

posted @ 2020-06-02 22:07  papering  阅读(236)  评论(0编辑  收藏  举报