diff options
| author | 2025-10-30 23:30:50 +0100 | |
|---|---|---|
| committer | 2025-11-01 10:24:56 +0100 | |
| commit | bdb43c486b1f5dbd8eedf866b4161b31f1e5d75a (patch) | |
| tree | f1b9a6642376db8c71f9767319cda1f26ef3b3f6 /src/tweetpipe_p.h | |
| parent | 945f3a935d85d55c23d5cfe4b98b064532dc6bcd (diff) | |
| download | tweetpipe-bdb43c486b1f5dbd8eedf866b4161b31f1e5d75a.tar.gz | |
Rename encpipe to tweetpipe
Diffstat (limited to 'src/tweetpipe_p.h')
| -rw-r--r-- | src/tweetpipe_p.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/tweetpipe_p.h b/src/tweetpipe_p.h new file mode 100644 index 0000000..06fc523 --- /dev/null +++ b/src/tweetpipe_p.h @@ -0,0 +1,41 @@ +#ifndef encpipe_p_H +#define encpipe_p_H 1 + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/uio.h> + +#include <assert.h> +#include <errno.h> +#include <fcntl.h> +#include <getopt.h> +#include <inttypes.h> +#include <stdarg.h> +#include <stdint.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> + +#include <tweetnacl.h> + +#include "common.h" +#include "safe_rw.h" + +#define MIN_BUFFER_SIZE 512 +#define MAX_BUFFER_SIZE 0x7fffffff +#define DEFAULT_BUFFER_SIZE (1 * 1024 * 1024) +#define PWHASH_OPSLIMIT 1000000 + +typedef struct Context_ { + char * in; + char * out; + unsigned char key[crypto_secretbox_KEYBYTES]; + unsigned char *buf; + size_t sizeof_buf; + int fd_in; + int fd_out; + int encrypt; + int has_key; +} Context; + +#endif |