Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
Msws Namespace Reference

Classes

class  State
 Wrapper class for internal state of the Msws generator. More...
 

Functions

static uint32_t msws (State &state)
 Generate new pseudo random number from given state variables and update them. More...
 
static uint32_t msws ()
 Generate new pseudo random number from global state variables and update them. More...
 
static uint32_t mswsi ()
 
static uint64_t init_rand_digits (uint64_t n)
 
static State seed (uint64_t n)
 

Variables

State GlobalMswsState = {.x = 0, .w = 0, .s = 0xb5ad4eceda1ce2a9}
 
constexpr uint64_t sconst []
 
uint64_t xi
 
uint64_t wi
 
uint64_t si
 

Function Documentation

◆ init_rand_digits()

static uint64_t Msws::init_rand_digits ( uint64_t  n)
inlinestatic

◆ msws() [1/2]

static uint32_t Msws::msws ( )
inlinestatic

Generate new pseudo random number from global state variables and update them.

◆ msws() [2/2]

static uint32_t Msws::msws ( State state)
inlinestatic

Generate new pseudo random number from given state variables and update them.

◆ mswsi()

static uint32_t Msws::mswsi ( )
inlinestatic

◆ seed()

static State Msws::seed ( uint64_t  n)
inlinestatic

Variable Documentation

◆ GlobalMswsState

State Msws::GlobalMswsState = {.x = 0, .w = 0, .s = 0xb5ad4eceda1ce2a9}

◆ sconst

constexpr uint64_t Msws::sconst[]
constexpr
Initial value:
= {
0x37e1c9b5e1a2b843, 0x56e9d7a3d6234c87, 0xc361be549a24e8c7, 0xd25b9768a1582d7b, 0x18b2547d3de29b67,
0xc1752836875c29ad, 0x4e85ba61e814cd25, 0x17489dc6729386c1, 0x7c1563ad89c2a65d, 0xcdb798e4ed82c675,
0xd98b72e4b4e682c1, 0xdacb7524e4b3927d, 0x53a8e9d7d1b5c827, 0xe28459db142e98a7, 0x72c1b3461e4569db,
0x1864e2d745e3b169, 0x6a2c143bdec97213, 0xb5e1d923d741a985, 0xb4875e967bc63d19, 0x92b64d5a82db4697,
0x7cae812d896eb1a5, 0xb53827d41769542d, 0x6d89b42c68a31db5, 0x75e26d434e2986d5, 0x7c82643d293cb865,
0x64c3bd82e8637a95, 0x2895c34d9dc83e61, 0xa7d58c34dea35721, 0x3dbc5e687c8e61d5, 0xb468a235e6d2b193,
}

◆ si

uint64_t Msws::si

◆ wi

uint64_t Msws::wi

◆ xi

uint64_t Msws::xi