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
Properties
_session
• Private _session: SRPSession
Defined in
_srp
• Private _srp: Core
Defined in
Accessors
A
• get A(): null | Uint8Array
Client-side random initializer, available after calling initialize
Returns
null | Uint8Array
Defined in
K
• get K(): null | Uint8Array
Common session key, available after calling initialize and setB
Returns
null | Uint8Array
Defined in
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
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
v
• get v(): null | Uint8Array
Verifier value, available after calling initialize
Returns
null | Uint8Array
Defined in
Methods
_getKey
▸ Private _getKey(): Promise<BigInteger>
Returns
Promise<BigInteger>
Defined in
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
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>