@iden3/js-crypto
Version:
Crypto primitives for iden3
45 lines • 2.72 kB
TypeScript
export declare const fromString: (s: string, radix?: number) => bigint;
export declare const e: (s: string, radix?: number) => bigint;
export declare const fromArray: (a: Uint8Array, r: number) => bigint;
export declare const bitLength: (a: bigint) => number;
export declare const isNegative: (a: bigint) => boolean;
export declare const isZero: (a: bigint) => boolean;
export declare const shiftLeft: (a: bigint, n: bigint) => bigint;
export declare const shiftRight: (a: bigint, n: bigint) => bigint;
export declare const shl: (a: bigint, n: bigint) => bigint;
export declare const shr: (a: bigint, n: bigint) => bigint;
export declare const isOdd: (a: bigint) => boolean;
export declare const naf: (n: bigint) => number[];
export declare const bits: (n: bigint) => number[];
export declare const toNumber: (s: bigint) => number;
export declare const toArray: (s: bigint, r: bigint) => number[];
export declare const add: (a: bigint, b: bigint) => bigint;
export declare const sub: (a: bigint, b: bigint) => bigint;
export declare const neg: (a: bigint) => bigint;
export declare const mul: (a: bigint, b: bigint) => bigint;
export declare const square: (a: bigint) => bigint;
export declare const pow: (a: bigint, b: bigint) => bigint;
export declare const exp: (a: bigint, b: bigint) => bigint;
export declare const abs: (a: bigint) => bigint;
export declare const div: (a: bigint, b: bigint) => bigint;
export declare const mod: (a: bigint, b: bigint) => bigint;
export declare const eq: (a: bigint, b: bigint) => boolean;
export declare const neq: (a: bigint, b: bigint) => boolean;
export declare const lt: (a: bigint, b: bigint) => boolean;
export declare const gt: (a: bigint, b: bigint) => boolean;
export declare const leq: (a: bigint, b: bigint) => boolean;
export declare const geq: (a: bigint, b: bigint) => boolean;
export declare const band: (a: bigint, b: bigint) => bigint;
export declare const bor: (a: bigint, b: bigint) => bigint;
export declare const bXor: (a: bigint, b: bigint) => bigint;
export declare const land: (a: bigint, b: bigint) => bigint;
export declare const lor: (a: bigint, b: bigint) => bigint;
export declare const toRprLE: (buff: Uint8Array, o: number, e: bigint, n8: number) => void;
export declare const toRprBE: (buff: Uint8Array, o: number, e: bigint, n8: number) => void;
export declare const fromRprLE: (buff: Uint8Array, o: number, n8?: number) => bigint;
export declare const fromRprBE: (buff: Uint8Array, o: number, n8: number) => bigint;
export declare const toString: (a: bigint, radix?: number) => string;
export declare const toLEBuff: (a: bigint) => Uint8Array;
export declare const zero: bigint;
export declare const one: bigint;
//# sourceMappingURL=scalar.d.ts.map