vibe.noise

Members

Aliases

VerifyKeyDelegate
alias VerifyKeyDelegate = bool delegate(scope const(ubyte[]))

Provide a delegate of this types to verify the public key of the node connected to.

Classes

AuthException
class AuthException

Exception thrown when authentication in createNoiseStream failed.

NoiseException
class NoiseException

Exception thrown on internal errors.

NoiseStream
class NoiseStream

Wraps a normal Stream to add encryption based on the Noise_XX_25519_ChaChaPoly_BLAKE2b protocol.

Enums

NoiseKind
enum NoiseKind

Kind of NoiseStream.

Functions

createKeys
void createKeys(string privKeyFile, string pubKeyFile)
void createKeys(Path privKeyFile, Path pubKeyFile)
void createKeys(string privKeyFile, ubyte[] pubKey)
void createKeys(Path privKeyFile, ubyte[] pubKey)
void createKeys(ubyte[] privKey, ubyte[] pubKey)

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

createNoiseStream
NoiseStream createNoiseStream(Stream stream, scope NoiseSettings settings)

Create a noise encrypted stream on top of a normal stream.

keyFromHex
void keyFromHex(char[] keyHex, ubyte[] keyBin)

Convert key from hex to binary format.

keyToHex
char[] keyToHex(ubyte[] keyBin, char[] keyHex)

Convert key from binary to hex format.

readPublicKey
void readPublicKey(string file, ubyte[] data)
void readPublicKey(Path file, ubyte[] data)

Reads a public key file writen by createKeys.

Manifest constants

KeySize
enum KeySize;

Key size of public and private keys.

Structs

NoiseSettings
struct NoiseSettings

Settings for the connectNoiseStream function.

Meta