js-srp6a
Version:
A modern SRP implementation for Node.js / Bun and web browsers
21 lines (20 loc) • 663 B
TypeScript
import { BigInteger } from 'jsbn';
declare const bi: unique symbol;
export declare class SRPInt {
hexLength: number | null;
[bi]: BigInteger;
constructor(bigInt: BigInteger, hexLength: number | null);
static ZERO: SRPInt;
static fromHex(hex: string): SRPInt;
static getRandom(bytes: number): SRPInt;
add(value: SRPInt): SRPInt;
equals(value: SRPInt): boolean;
mod(modulus: SRPInt): SRPInt;
modPow(exponent: SRPInt, modulus: SRPInt): SRPInt;
multiply(value: SRPInt): SRPInt;
pad(paddedHexLength: number): SRPInt;
subtract(value: SRPInt): SRPInt;
toHex(): string;
xor(value: SRPInt): SRPInt;
}
export {};