Skip to content

FSMaxB/molch-buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

molch-buffer

Travis Build Status

This is a buffer datatype created for the molch crypto library, see https://github.com/FSMaxB/molch. It uses functions provided by libsodium.

molch-buffer combines a buffer datatype (simple struct containing a pointer to an array and it's length). And helper functions to work with those buffers.

typedef struct buffer_t {
	const size_t buffer_length;
	size_t content_length;
	/*This position can be used by parsers etc. to keep track of the position
	it is initialized with a value of 0.*/
	size_t position;
	bool readonly; //if set, this buffer shouldn't be written to.
	unsigned char * const content;
} buffer_t;

To use it just put buffer.h and buffer.c into your project. You also need to tell the linker to link it against libsodium.

molch-buffer is licensed under the ISC license.

About

Buffer datatype for molch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors