(H, sig, asn1)
| 93 | return R.X === r; |
| 94 | } |
| 95 | verify(H, sig, asn1) { |
| 96 | var r, s; |
| 97 | if (asn1) { |
| 98 | let ber = new BER(sig); |
| 99 | let seq = new BER(ber.getSequence()); |
| 100 | r = seq.getInteger(); |
| 101 | s = seq.getInteger(); |
| 102 | } |
| 103 | else { |
| 104 | let l = this.orderSize; |
| 105 | r = PKCS1.OS2IP(sig.slice(0, l)); |
| 106 | s = PKCS1.OS2IP(sig.slice(l, l*2)); |
| 107 | } |
| 108 | return this._verify(H, r, s); |
| 109 | } |
| 110 | static randint(max) { |
| 111 | var i = BigInt.fromArrayBuffer(RNG.get(BigInt.bitLength(max) >>> 3)); |
| 112 | while (i >= max) |
nothing calls this directly
no test coverage detected