Noise-C
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Functions
patterns.c File Reference

Defines the handshake message patterns. More...

#include "internal.h"

Go to the source code of this file.

Functions

const uint8_t * noise_pattern_lookup (int id)
 Looks up a specific handshake pattern. More...
 
NoisePatternFlags_t noise_pattern_reverse_flags (NoisePatternFlags_t flags)
 Reverses the local and remote flags for a pattern. More...
 

Detailed Description

Defines the handshake message patterns.

Definition in file patterns.c.

Function Documentation

const uint8_t* noise_pattern_lookup ( int  id)

Looks up a specific handshake pattern.

Parameters
idThe identifier for the handshake pattern.
Returns
A pointer to the pattern or NULL if id is unknown.

The first byte of the returned pattern contains the pattern flags. The remaining bytes are the token for the pattern, terminated by NOISE_TOKEN_END.

Definition at line 1253 of file patterns.c.

NoisePatternFlags_t noise_pattern_reverse_flags ( NoisePatternFlags_t  flags)

Reverses the local and remote flags for a pattern.

Parameters
flagsThe flags, assuming that the initiator is "local".
Returns
The reversed flags, with the responder now being "local".

Definition at line 1306 of file patterns.c.