ESPHome 2026.9.0
Loading...
Searching...
No Matches
esphome::noise::NoiseContext Class Reference

#include <noise.h>

Public Member Functions

void set_psk (const uint8_t *psk)
 psk points at 32 bytes that outlive the context (PROGMEM or caller owned RAM); nullptr means no key.
 
void load_psk (psk_t &out) const
 Copy the key out (flash-aware on ESP8266); all zeros when none is set.
 
bool has_psk () const
 

Static Public Member Functions

static bool is_all_zeros (const psk_t &psk)
 

Protected Attributes

const uint8_t * psk_ {nullptr}
 

Detailed Description

Definition at line 13 of file noise.h.

Member Function Documentation

◆ has_psk()

bool esphome::noise::NoiseContext::has_psk ( ) const
inline

Definition at line 32 of file noise.h.

◆ is_all_zeros()

static bool esphome::noise::NoiseContext::is_all_zeros ( const psk_t & psk)
inlinestatic

Definition at line 19 of file noise.h.

◆ load_psk()

void esphome::noise::NoiseContext::load_psk ( psk_t & out) const

Copy the key out (flash-aware on ESP8266); all zeros when none is set.

Definition at line 19 of file noise.cpp.

◆ set_psk()

void esphome::noise::NoiseContext::set_psk ( const uint8_t * psk)
inline

psk points at 32 bytes that outlive the context (PROGMEM or caller owned RAM); nullptr means no key.

Runtime callers map the all-zeros key to nullptr themselves; validation keeps it out of yaml.

Definition at line 29 of file noise.h.

Field Documentation

◆ psk_

const uint8_t* esphome::noise::NoiseContext::psk_ {nullptr}
protected

Definition at line 35 of file noise.h.


The documentation for this class was generated from the following files: