kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

dist_host.h (642B)


      1 #ifndef KIT_DRIVER_DIST_HOST_H
      2 #define KIT_DRIVER_DIST_HOST_H
      3 
      4 #include <kit/cas.h>
      5 #include <stdint.h>
      6 
      7 #include "env.h"
      8 
      9 /* Adapters that turn a DriverEnv into the host vtables libkit's cas/package
     10  * APIs expect. The returned struct borrows `env`; it must not outlive
     11  * driver_env_fini. */
     12 
     13 /* KitCasHost backed by the DriverEnv's POSIX file I/O, mkdir -p, chmod, and
     14  * recursive directory walk. */
     15 KitCasHost driver_cas_host(DriverEnv* env);
     16 
     17 /* Host CSPRNG adapter, shaped for kit_pkg_keygen's fill_random parameter.
     18  * Ignores `user`; reads from the host CSPRNG. */
     19 int driver_dist_random(void* user, uint8_t* out, size_t n);
     20 
     21 #endif