libluksde(3)

NAME
libluksde.h - Library to access the Linux Unified Key Setup (LUKS) Disk Encryption format

SYNOPSIS
#include <libluksde.h>

Support functions
const char *
libluksde_get_version(void);
int
libluksde_get_access_flags_read(void);
int
libluksde_get_codepage(int *codepage, libluksde_error_t **error);
int
libluksde_set_codepage(int codepage, libluksde_error_t **error);
int
libluksde_check_volume_signature(const char *filename, libluksde_error_t **error);
int
libluksde_check_volume_signature_wide(const wchar_t *filename, libluksde_error_t **error);

Available when compiled with libbfio support:
int
libluksde_check_volume_signature_file_io_handle(libbfio_handle_t *file_io_handle, libluksde_error_t **error);

Notify functions
void
libluksde_notify_set_verbose(int verbose);
int
libluksde_notify_set_stream(FILE *stream, libluksde_error_t **error);
int
libluksde_notify_stream_open(const char *filename, libluksde_error_t **error);
int
libluksde_notify_stream_close(libluksde_error_t **error);

Error functions
void
libluksde_error_free(libluksde_error_t **error);
int
libluksde_error_fprint(libluksde_error_t *error, FILE *stream);
int
libluksde_error_sprint(libluksde_error_t *error, char *string, size_t size);
int
libluksde_error_backtrace_fprint(libluksde_error_t *error, FILE *stream);
int
libluksde_error_backtrace_sprint(libluksde_error_t *error, char *string, size_t size);

Volume functions
int
libluksde_volume_initialize(libluksde_volume_t **volume, libluksde_error_t **error);
int
libluksde_volume_free(libluksde_volume_t **volume, libluksde_error_t **error);
int
libluksde_volume_signal_abort(libluksde_volume_t *volume, libluksde_error_t **error);
int
libluksde_volume_open(libluksde_volume_t *volume, const char *filename, int access_flags, libluksde_error_t **error);
int
libluksde_volume_close(libluksde_volume_t *volume, libluksde_error_t **error);
int
libluksde_volume_is_locked(libluksde_volume_t *volume, libluksde_error_t **error);
int
libluksde_volume_unlock(libluksde_volume_t *volume, libluksde_error_t **error);
ssize_t
libluksde_volume_read_buffer(libluksde_volume_t *volume, void *buffer, size_t buffer_size, libluksde_error_t **error);
ssize_t
libluksde_volume_read_buffer_at_offset(libluksde_volume_t *volume, void *buffer, size_t buffer_size, off64_t offset, libluksde_error_t **error);
off64_t
libluksde_volume_seek_offset(libluksde_volume_t *volume, off64_t offset, int whence, libluksde_error_t **error);
int
libluksde_volume_get_offset(libluksde_volume_t *volume, off64_t *offset, libluksde_error_t **error);
int
libluksde_volume_get_size(libluksde_volume_t *volume, size64_t *size, libluksde_error_t **error);
int
libluksde_volume_get_encryption_method(libluksde_volume_t *volume, int *encryption_method, int *encryption_chaining_mode, libluksde_error_t **error);
int
libluksde_volume_get_volume_identifier(libluksde_volume_t *volume, uint8_t *uuid_data, size_t uuid_data_size, libluksde_error_t **error);
int
libluksde_volume_set_key(libluksde_volume_t *volume, const uint8_t *master_key, size_t master_key_size, libluksde_error_t **error);
int
libluksde_volume_set_utf8_password(libluksde_volume_t *volume, const uint8_t *utf8_string, size_t utf8_string_length, libluksde_error_t **error);
int
libluksde_volume_set_utf16_password(libluksde_volume_t *volume, const uint16_t *utf16_string, size_t utf16_string_length, libluksde_error_t **error);

Available when compiled with wide character string support:
int
libluksde_volume_open_wide(libluksde_volume_t *volume, const wchar_t *filename, int access_flags, libluksde_error_t **error);

Available when compiled with libbfio support:
int
libluksde_volume_open_file_io_handle(libluksde_volume_t *volume, libbfio_handle_t *file_io_handle, int access_flags, libluksde_error_t **error);

DESCRIPTION
The libluksde_get_version() function is used to retrieve the library version.

RETURN VALUES
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see "libluksde.h".

ENVIRONMENT
None

FILES
None

NOTES
libluksde can be compiled with wide character support (wchar_t).

To compile libluksde with wide character support use: ./configure --enable-wide-character-type=yes or define: _UNICODE or UNICODE during compilation.

LIBLUKSDE_WIDE_CHARACTER_TYPE in libluksde/features.h can be used to determine if libluksde was compiled with wide character support.

BUGS
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libluksde/issues

AUTHOR
These man pages are generated from "libluksde.h".

COPYRIGHT
Copyright (C) 2013-2024, Joachim Metz <joachim.metz@gmail.com>.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO
the libluksde.h include file