Module vibe.noise

Functions

NameDescription
createKeys(privKeyFile, pubKeyFile)Create a public/private keypair to be used with createNoiseStream.
createNoiseStream(stream, settings)Create a noise encrypted stream on top of a normal stream.
keyFromHex(keyHex, keyBin)Convert key from hex to binary format.
keyToHex(keyBin, keyHex)Convert key from binary to hex format.
readPublicKey(file, data)Reads a public key file writen by createKeys.
noiseCheck(code, msg, file, line, next)
noiseEnforce(condition, msg, file, line, next)

Classes

NameDescription
AuthExceptionException thrown when authentication in createNoiseStream failed.
NoiseExceptionException thrown on internal errors.
NoiseStreamWraps a normal Stream to add encryption based on the Noise_XX_25519_ChaChaPoly_BLAKE2b protocol.

Structs

NameDescription
NoiseSettingsSettings for the connectNoiseStream function.

Enums

NameDescription
NoiseKindKind of NoiseStream.

Manifest constants

NameTypeDescription
KeySizeKey size of public and private keys.

Global variables

NameTypeDescription
initResultint
sodiumResultint

Aliases

NameTypeDescription
VerifyKeyDelegatenothrow bool delegate(scope const(ubyte[]))Provide a delegate of this types to verify the public key of the node connected to.