post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
|
file operations More...
#include "ntru_common.h"
#include "ntru_err.h"
#include "ntru_mem.h"
#include "ntru_string.h"
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | STD_FILE_BUF 4096 |
Functions | |
string * | read_file (char const *const filename) |
bool | write_file (string const *wstring, char const *const filename) |
file operations
Allows operations on files, such as reading and writing.
Definition in file ntru_file.c.
#define STD_FILE_BUF 4096 |
Definition at line 44 of file ntru_file.c.
string* read_file | ( | char const *const | filename | ) |
Reads a file and returns a newly allocated string.
filename | file to open |
Definition at line 50 of file ntru_file.c.
bool write_file | ( | string const * | wstring, |
char const *const | filename | ||
) |
Write a string to a file. The file will be pruned or created if it does not exist.
wstring | the string to write to the file |
filename | the name of the file to write to |
Definition at line 107 of file ntru_file.c.