Function createKeys

Create a public/private keypair to be used with createNoiseStream.

void createKeys (
  string privKeyFile,
  string pubKeyFile
);

void createKeys (
  vibe.inet.path.Path privKeyFile,
  vibe.inet.path.Path pubKeyFile
);

void createKeys (
  string privKeyFile,
  ubyte[] pubKey
);

void createKeys (
  vibe.inet.path.Path privKeyFile,
  ubyte[] pubKey
);

void createKeys (
  ubyte[] privKey,
  ubyte[] pubKey
);

Warning

When using the overload taking two ubyte[] buffers, the privKey buffer needs to be a secure buffer. Avoid copying this data around and make sure to (properly!) zero the data if you no longer need it. Also guarding the key memory page as done by libsodium is recommended.

The overloads not taking a privateKey ubyte[] buffer handle all these details.