@wault-pw/srp6a-webcrypto
Version:
Pure javascript implementation of SRP-6a (RFC-5054, RFC-2945) using web-crypto
30 lines (29 loc) • 820 B
TypeScript
import { Params } from "./rfc5054";
export declare class SrpClient {
private readonly e;
private readonly password;
readonly username: string;
private s;
_a: Uint8Array | null;
constructor(username: string, password: string, params: Params);
randomSalt(): Promise<Uint8Array>;
seed(s: Uint8Array): void;
get salt(): Uint8Array;
verifier(): Promise<Uint8Array>;
setServerPublicKey(B: Uint8Array): Promise<ClientChallenge>;
}
export declare class ClientChallenge {
k: Uint8Array;
x: Uint8Array;
a: Uint8Array;
A: Uint8Array;
u: Uint8Array;
S: Uint8Array;
m1: Uint8Array;
m2: Uint8Array;
constructor();
get secretKey(): Uint8Array;
get publicKey(): Uint8Array;
get proof(): Uint8Array;
isProofValid(m2: Uint8Array): boolean;
}