nl_tokens: Return a point on the curve . Will throw error if ( x y ) is not on curve .
pl_tokens: function _sm2Point ( x , y , parity ) { if ( x == null ) { return SM2 . point ( ) ; } var pt ; if ( y != null ) { pt = SM2 . point ( x , y ) ; if ( ! SM2 . validate ( pt ) ) { throw 'point is not on curve' ; } } else { var px = new BN ( x , 16 ) . toRed ( SM2 . red ) ; var py = px . redSqr ( ) . redMul ( px ) ; py = py . redIAdd ( px . redMul ( SM2 . a ) ) . redIAdd ( SM2 . b ) . redSqrt ( ) ; if ( ( parity === 'odd' ) != py . fromRed ( ) . isOdd ( ) ) { py = py . redNeg ( ) ; } <mask> = SM2 . point ( px , py ) ; } return pt ; }