esp-ble-prov
Version:
ESP32 provisioning with WebBluetooth
29 lines (28 loc) • 841 B
TypeScript
import Security from './security';
export interface Security2Options {
/**
* SRP6a username (must match the device firmware).
* @default "wifiprov"
*/
username?: string;
/**
* SRP6a password / proof-of-possession.
*/
password: string;
}
export default class Security2 extends Security {
private username;
private password;
private srp;
private sessionKey;
private nonce;
private staticNonce;
constructor(options: Security2Options);
setup0Request(): Promise<Uint8Array>;
setup0Response(response: Uint8Array): Promise<void>;
setup1Request(): Uint8Array;
setup1Response(response: Uint8Array): void;
encrypt(data: Uint8Array<ArrayBuffer>): Promise<Uint8Array>;
decrypt(data: Uint8Array<ArrayBuffer>): Promise<Uint8Array>;
private incrementNonce;
}