Padloc Logo Docs & Resources

Class: Client

srp.Client

High-level interface for the client side

Constructors

constructor

new Client(state?, length?)

Parameters

Name Type Default value
state SRPSession undefined
length SRPGroupLength 4096

Defined in

core/src/srp.ts:200

Properties

_session

Private _session: SRPSession

Defined in

core/src/srp.ts:198


_srp

Private _srp: Core

Defined in

core/src/srp.ts:197

Accessors

A

get A(): null | Uint8Array

Client-side random initializer, available after calling initialize

Returns

null | Uint8Array

Defined in

core/src/srp.ts:172


K

get K(): null | Uint8Array

Common session key, available after calling initialize and setB

Returns

null | Uint8Array

Defined in

core/src/srp.ts:177


M1

get M1(): null | Uint8Array

First value used to verify a successful key exchange, available after calling initialize and setB

Returns

null | Uint8Array

Defined in

core/src/srp.ts:185


M2

get M2(): null | Uint8Array

Second value used to verify a successful key exchange, available after calling initialize and setB

Returns

null | Uint8Array

Defined in

core/src/srp.ts:193


v

get v(): null | Uint8Array

Verifier value, available after calling initialize

Returns

null | Uint8Array

Defined in

core/src/srp.ts:167

Methods

_getKey

Private _getKey(): Promise<BigInteger>

Returns

Promise<BigInteger>

Defined in

core/src/srp.ts:227


initialize

initialize(x): Promise<void>

Initialize client using the given secret x, generating v and A

Parameters

Name Type
x Uint8Array

Returns

Promise<void>

Defined in

core/src/srp.ts:206


setB

setB(B): Promise<void>

Apply Server.B value, calculating K, M1 and M2. Should only be called after initialize has been called.

Parameters

Name Type
B Uint8Array

Returns

Promise<void>

Defined in

core/src/srp.ts:217