opensc
NPCI secure-component & UPI Lite / Lite X wallet reimplementation
Loading...
Searching...
No Matches
env.h File Reference

The injected runtime environment (crypto, keystore, store, clock, RNG) the wallet runs against. More...

#include <stdint.h>
#include "lite/crypto.h"
#include "lite/keystore.h"
#include "lite/store.h"
Include dependency graph for env.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lite_clock
 Pluggable clock so tests can pin "now". More...
 
struct  lite_rng
 Pluggable RNG so tests can make IVs and salts reproducible. More...
 
struct  lite_env
 Everything the wallet needs, injected so tests can pin the clock, RNG and keys. More...
 

Functions

lite_clock * lite_clock_fixed_new (int64_t millis)
 Allocates a fixed clock reading millis. Free with lite_clock_fixed_free().
 
void lite_clock_fixed_set (lite_clock *c, int64_t millis)
 Sets the time a fixed clock reports.
 
void lite_clock_fixed_free (lite_clock *c)
 Frees a fixed clock created by lite_clock_fixed_new().
 
lite_rng * lite_rng_seeded_new (uint64_t seed)
 Allocates a deterministic (seeded) RNG. Free with lite_rng_seeded_free().
 
void lite_rng_seeded_free (lite_rng *r)
 Frees a seeded RNG created by lite_rng_seeded_new().
 

Detailed Description

The injected runtime environment (crypto, keystore, store, clock, RNG) the wallet runs against.