Rewrite and export crypt_wipe function.

The crypt_wipe can be used to wipe any part of the device,
and also to initialize integrity based device (to reset checksum).
This commit is contained in:
Milan Broz
2017-06-07 15:31:13 +02:00
parent c6408f4b31
commit 3a27c84d98
10 changed files with 359 additions and 177 deletions

View File

@@ -37,6 +37,7 @@
#include <fcntl.h>
#include <popt.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "lib/nls.h"
#include "lib/utils_crypt.h"
@@ -85,6 +86,11 @@ int tools_is_stdin(const char *key_file);
int tools_string_to_size(struct crypt_device *cd, const char *s, uint64_t *size);
int tools_is_cipher_null(const char *cipher);
void tools_clear_line(void);
void tools_time_progress(uint64_t device_size, uint64_t bytes,
struct timeval *start_time, struct timeval *end_time);
/* Log */
#define log_dbg(x...) clogger(NULL, CRYPT_LOG_DEBUG, __FILE__, __LINE__, x)
#define log_std(x...) clogger(NULL, CRYPT_LOG_NORMAL, __FILE__, __LINE__, x)