aboutsummaryrefslogtreecommitdiffstats
path: root/src/passphrase.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-23 14:41:04 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-23 14:41:04 +0200
commitc119aa19a9147d104db2f2b5b611604b4f07f6b3 (patch)
tree0174a5f706d6447d1152b6e06d248c32ad699c6c /src/passphrase.h
parentfix warnings (diff)
downloadlibpassphrase-c119aa19a9147d104db2f2b5b611604b4f07f6b3.tar.gz
libpassphrase-c119aa19a9147d104db2f2b5b611604b4f07f6b3.tar.bz2
libpassphrase-c119aa19a9147d104db2f2b5b611604b4f07f6b3.tar.xz
add passphrase_wipe
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/passphrase.h')
-rw-r--r--src/passphrase.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/passphrase.h b/src/passphrase.h
index 932b6e5..0731404 100644
--- a/src/passphrase.h
+++ b/src/passphrase.h
@@ -28,6 +28,14 @@
extern char* passphrase_read(void);
/**
+ * Forcable write NUL characters to a passphrase
+ *
+ * @param ptr The password to wipe
+ * @param n The number of characters to wipe
+ */
+extern void passphrase_wipe(char* ptr, size_t n) __attribute__((optimize("-O0")));
+
+/**
* Disable echoing and do anything else to the terminal settnings `passphrase_read` requires
*/
extern void passphrase_disable_echo(void);