jsbn/000755 001751 000177 0000000000 14522325161013470 5ustar00runner000000 000000 1452232516114522325161jsbn/LICENSE000644 001751 000177 0000002165 14522325161014501 0ustar00runner000000 000000 1452232516114522325161 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE jsbn/README.md000644 001751 000177 0000000732 14522325161014757 0ustar00runner000000 000000 1452237431614522325161# Installation > `npm install --save @types/jsbn` # Summary This package contains type definitions for jsbn (http://www-cs-students.stanford.edu/%7Etjw/jsbn/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsbn. ### Additional Details * Last updated: Tue, 07 Nov 2023 03:09:37 GMT * Dependencies: none # Credits These definitions were written by [Eugene Chernyshov](https://github.com/Evgenus). jsbn/index.d.ts000644 001751 000177 0000014474 14522325161015403 0ustar00runner000000 000000 1452232516114522325161export interface RandomGenerator { nextBytes(bytes: number[]): void; } export class BigInteger { constructor(a: number, c: RandomGenerator); constructor(a: number, b: number, c: RandomGenerator); constructor(a: string, b?: number); constructor(a: number[], b?: number); constructor(a: BigInteger); s: number; t: number; data: number[]; // forge specific DB: number; DM: number; DV: number; FV: number; F1: number; F2: number; // am: Compute w_j += (x*this_i), propagate carries, am(i: number, x: number, w: BigInteger, j: number, c: number, n: number): number; // (protected) copy this to r copyTo(r: BigInteger): void; // (protected) set from integer value x, -DV <= x < DV fromInt(x: number): void; // (protected) set from string and radix fromString(x: string, b: number): void; // (protected) clamp off excess high words clamp(): void; // (public) return string representation in given radix toString(b?: number): string; // (public) -this negate(): BigInteger; // (public) |this| abs(): BigInteger; // (public) return + if this > a, - if this < a, 0 if equal compareTo(a: BigInteger): number; // (public) return the number of bits in "this" bitLength(): number; // (protected) r = this << n*DB dlShiftTo(n: number, r: BigInteger): void; // (protected) r = this >> n*DB drShiftTo(n: number, r: BigInteger): void; // (protected) r = this << n lShiftTo(n: number, r: BigInteger): void; // (protected) r = this >> n rShiftTo(n: number, r: BigInteger): void; // (protected) r = this - a subTo(a: BigInteger, r: BigInteger): void; // (protected) r = this * a, r != this,a (HAC 14.12) multiplyTo(a: BigInteger, r: BigInteger): void; // (protected) r = this^2, r != this (HAC 14.16) squareTo(r: BigInteger): void; // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) // r != q, this != m. q or r may be null. divRemTo(m: BigInteger, q: BigInteger, r: BigInteger): void; // (public) this mod a mod(a: BigInteger): BigInteger; // (protected) return "-1/this % 2^DB"; useful for Mont. reduction invDigit(): number; // (protected) true iff this is even isEven(): boolean; // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) exp(e: number, z: Reduction): BigInteger; // (public) this^e % m, 0 <= e < 2^32 modPowInt(e: number, m: BigInteger): BigInteger; // (public) clone(): BigInteger; // (public) return value as integer intValue(): number; // (public) return value as byte byteValue(): number; // (public) return value as short (assumes DB>=16) shortValue(): number; // (protected) return x s.t. r^x < DV chunkSize(r: number): number; // (public) 0 if this == 0, 1 if this > 0 signum(): number; // (protected) convert to radix string toRadix(b: number): string; // (protected) convert from radix string fromRadix(s: string, b: number): void; // (protected) alternate constructor fromNumber(a: number, b?: number, c?: number): void; // (public) convert to bigendian byte array toByteArray(): number[]; equals(a: BigInteger): boolean; min(a: BigInteger): BigInteger; max(a: BigInteger): BigInteger; // (protected) r = this op a (bitwise) bitwiseTo(a: BigInteger, op: (x: number, y: number) => number, r: BigInteger): void; // (public) this & a and(a: BigInteger): BigInteger; // (public) this | a or(a: BigInteger): BigInteger; // (public) this ^ a xor(a: BigInteger): BigInteger; // (public) this & ~a andNot(a: BigInteger): BigInteger; // (public) ~this not(): BigInteger; // (public) this << n shiftLeft(n: number): BigInteger; // (public) this >> n shiftRight(n: number): BigInteger; // (public) returns index of lowest 1-bit (or -1 if none) getLowestSetBit(): number; // (public) return number of set bits bitCount(): number; // (public) true iff nth bit is set testBit(n: number): boolean; // (protected) this op (1< number): BigInteger; // (protected) this op (1<= 0, 1 < n < DV dMultiply(n: number): void; // (protected) this += n << w words, this >= 0 dAddOffset(n: number, w: number): void; // (public) this^e pow(e: number): BigInteger; // (protected) r = lower n words of "this * a", a.t <= n multiplyLowerTo(a: BigInteger, n: number, r: BigInteger): void; // (protected) r = "this * a" without lower n words, n > 0 multiplyUpperTo(a: BigInteger, n: number, r: BigInteger): void; // (public) this^e % m (HAC 14.85) modPow(e: BigInteger, m: BigInteger): BigInteger; // (public) gcd(this,a) (HAC 14.54) gcd(a: BigInteger): BigInteger; // (protected) this % n, n < 2^26 modInt(n: number): number; // (public) 1/this % m (HAC 14.61) modInverse(m: BigInteger): BigInteger; // (public) test primality with certainty >= 1-.5^t isProbablePrime(t: number): boolean; // (protected) true if probably prime (HAC 4.24, Miller-Rabin) millerRabin(t: number): boolean; static ZERO: BigInteger; static ONE: BigInteger; } export interface Reduction { convert(x: BigInteger): BigInteger; revert(x: BigInteger): BigInteger; reduce(x: BigInteger): void; mulTo(x: BigInteger, y: BigInteger, r: BigInteger): void; sqrTo(x: BigInteger, r: BigInteger): void; } export as namespace jsbn; jsbn/package.json000644 001751 000177 0000001412 14522325161015762 0ustar00runner000000 000000 1452237431614522325161{ "name": "@types/jsbn", "version": "1.2.33", "description": "TypeScript definitions for jsbn", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsbn", "license": "MIT", "contributors": [ { "name": "Eugene Chernyshov", "githubUsername": "Evgenus", "url": "https://github.com/Evgenus" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/jsbn" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "5ecb0c6ad6a1c489fa0c5d7fb98b271b89f122003ba96a97ef085287b590cfc4", "typeScriptVersion": "4.5" }