diff options
Diffstat (limited to 'src/libecryptfs-swig/libecryptfs.i')
-rw-r--r-- | src/libecryptfs-swig/libecryptfs.i | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libecryptfs-swig/libecryptfs.i b/src/libecryptfs-swig/libecryptfs.i new file mode 100644 index 0000000..e7fd3d3 --- /dev/null +++ b/src/libecryptfs-swig/libecryptfs.i @@ -0,0 +1,17 @@ +%module libecryptfs +%{ +#include "../include/ecryptfs.h" +extern binary_data ecryptfs_passphrase_blob(char *salt, char *passphrase); +extern binary_data ecryptfs_passphrase_sig_from_blob(char *blob); +extern int ecryptfs_add_blob_to_keyring(char *blob, char *sig); +%} + +#include "../include/ecryptfs.h" + +%typemap(out) binary_data { + $result = PyString_FromStringAndSize((char *)($1.data),$1.size); +} + +extern binary_data ecryptfs_passphrase_blob(char *salt, char *passphrase); +extern binary_data ecryptfs_passphrase_sig_from_blob(char *blob); +extern int ecryptfs_add_blob_to_keyring(char *blob, char *sig); |