asmcrypto.js
Advanced tools
Comparing version 0.18.1 to 0.18.2
{ | ||
"name": "asmcrypto.js", | ||
"version": "0.18.1", | ||
"version": "0.18.2", | ||
"description": "Asm.js implementation of WebCrypto API", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/vibornoff/asmcrypto.js", |
// Tests if the number supplied is a Miller-Rabin strong probable prime | ||
import {BigNumber_constructor} from './bignum'; | ||
import {BigNumber_constructor, BigNumber_ONE} from './bignum'; | ||
import {pow2_ceil} from '../utils'; | ||
@@ -16,3 +16,3 @@ import {Random_getValues} from '../random/random'; | ||
var m = new Modulus(this), | ||
m1 = this.subtract(BigNumber_constructor.ONE), | ||
m1 = this.subtract(BigNumber_ONE), | ||
a = new BigNumber_constructor(this), | ||
@@ -28,3 +28,3 @@ l = this.limbs.length-1; | ||
var x = m.power( a, t ); | ||
if ( x.compare(BigNumber_constructor.ONE) === 0 ) continue; | ||
if ( x.compare(BigNumber_ONE) === 0 ) continue; | ||
if ( x.compare(m1) === 0 ) continue; | ||
@@ -35,3 +35,3 @@ | ||
x = x.square().divide(m).remainder; | ||
if ( x.compare(BigNumber_constructor.ONE) === 0 ) return false; | ||
if ( x.compare(BigNumber_ONE) === 0 ) return false; | ||
if ( x.compare(m1) === 0 ) break; | ||
@@ -38,0 +38,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/*! asmCrypto v0.18.1, (c) 2018 asmCrypto.js, opensource.org/licenses/MIT */ | ||
/*! asmCrypto v0.18.2, (c) 2018 asmCrypto.js, opensource.org/licenses/MIT */ | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6071260