summaryrefslogtreecommitdiff
path: root/src/libstrongswan/chunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/chunk.h')
-rw-r--r--src/libstrongswan/chunk.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstrongswan/chunk.h b/src/libstrongswan/chunk.h
index a13ccfc22..9c0aabba1 100644
--- a/src/libstrongswan/chunk.h
+++ b/src/libstrongswan/chunk.h
@@ -84,11 +84,21 @@ void chunk_split(chunk_t chunk, const char *mode, ...);
bool chunk_write(chunk_t chunk, const char *path, const char *label, mode_t mask, bool force);
/**
+ * convert a chunk to an allocated hex string
+ */
+char *chunk_to_hex(chunk_t chunk, bool uppercase);
+
+/**
* Free contents of a chunk
*/
void chunk_free(chunk_t *chunk);
/**
+ * Overwrite the contents of a chunk with pseudo-random bytes and free them
+ */
+void chunk_free_randomized(chunk_t *chunk);
+
+/**
* Initialize a chunk to point to buffer inspectable by sizeof()
*/
#define chunk_from_buf(str) { str, sizeof(str) }