Skip to content

C library to store data or multiple files in an encrypted single-file storage.

License

Notifications You must be signed in to change notification settings

swasun/LibSecureStorage

Repository files navigation

Description

C library to store data or multiple files in an encrypted single-file storage.

API

Example of use of API without error handling for sake of simplicity. For a detailed example, see examples folder.

Create entries

sstorage_entry *first = sstorage_entry_create(<DATA_TYPE_INTEGER>);
sstorage_entry_add_string(first, "Hello world !");

// write first entry
sstorage_entry_destroy(first);

sstorage_entry *second = sstorage_entry_create(<DATA_TYPE_INTEGER>);
sstorage_entry_add_file(second, "data.bin");

// write second entry
sstorage_entry_destroy(second);

Write entries to storage

sstorage *storage = sstorage_open_write("example.sst", <crypto_metadata>);

sstorage_push_entry(storage, first);
sstorage_push_entry(storage, second);

sstorage_close(storage);

Read an entry from storage

sstorage *storage = sstorage_open_read("example.sst", <crypto_metadata>);

if (!sstorage_has_next(storage)) {
    <error_handling>
}

entry = sstorage_next(storage);

sstorage_close(storage);

Dependencies

Cross-plateform

Tested on Windows 64, but it should also work on Windows x86 and Linux.

About

C library to store data or multiple files in an encrypted single-file storage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages