UNPKG

@wault-pw/srp6a-webcrypto

Version:

Pure javascript implementation of SRP-6a (RFC-5054, RFC-2945) using web-crypto

11 lines (10 loc) 782 B
import bigInt from "big-integer"; export declare function BigIntFromUint8Array(input: Uint8Array): bigInt.BigInteger; export declare function BigIntFromInt(input: number): bigInt.BigInteger; export declare function EuclideanModPow(a: bigInt.BigInteger, b: bigInt.BigInteger, m: bigInt.BigInteger): bigInt.BigInteger; export declare function BigInt2Uint8Array(input: bigInt.BigInteger): Uint8Array; export declare function Uint8Array2Hex(input: Uint8Array): string; export declare function Uint8ArrayFromHex(input: string): Uint8Array; export declare function SecureEqual(uno: Uint8Array, dos: Uint8Array): boolean; export declare function SecureRandom(length: number): Promise<Uint8Array>; export declare function Hash(name: string, ...inputs: (Uint8Array)[]): Promise<Uint8Array>;