blob: 664e4e6ca83dacd5b69dbeafefbd089e9754dd57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef __SLOTS__ENCRYPTION_H__176771896719387
#define __SLOTS__ENCRYPTION_H__176771896719387
#include "ll.h"
#include <stddef.h>
/* Overwrite an open file with "encrypted" data by XOR'ing each byte with a character from PASSPHRASE. Returns number of bytes overwritten, and -1 on error */
size_t passenc(int fd, const char *passphrase);
/* Encrypt file descriptor FD one block at a time using PASSPHRASE as the encryption key */
size_t passencblock(int fd, const char *passphrase);
// Encrypt a nodelist
int encryptvxgg(const struct nodelist *list, const char *passphrase);
// Decrypt a nodelist
int decryptvxgg(const struct nodelist *list, const char *passphrase);
// Encrypt or decrypt a nodelist
#define VXGG_ENCRYPT 0
#define VXGG_DECRYPT 1
int ENorDE_cryptvxgg(const struct nodelist *list, const char *passphrase, int flag);
#endif
|