π‘οΈ clog β Cryptographically Secure Daily Journal/Diary API
clog is a Rust crate designed to help you securely store daily notes, thoughts, or any sensitive content β all inside a single encrypted .clog file. Every note is organized in a virtual folder-file structure, mimicking a traditional file system β but with encryption and portability in mind.
Without the correct password, nothing can be accessed β not even metadata.
This crate is ideal for journaling, private notes, and tamper-proof content storage.
π¦ Application
Try the terminal-based daily diary built with
clog_rs:
π clog-tui v1.3.0
β¨ Features
- π End-to-end AES encryption (password-based)
- π Entries auto-organized by virtual date-based folders (e.g.
25/05/2025) - π Only entries from today can be edited (others are read-only)
- π All notes and metadata stored in a single
.clogfile - π₯ Multi-user support (password-protected)
- π§Ύ Export clean JSON metadata for syncing or backups
π How Storage Works
Instead of using actual folders and files on disk, clog creates a virtual file system inside a .clog file.
π Example:
Suppose you write two entries on different dates:
- On
25/05/2025:morning-thoughtsandevening-reflection - On
24/05/2025:goals
All of this is stored inside my_journal.clog like so:
π Note: All this lives inside a single .clog file β portable, encrypted, and compact.
π Installation
Add to your Cargo.toml:
[]
= "1.0.1"
or use
π οΈ API Overview
β add_new_user
add_new_user
Creates a new encrypted .clog file and initializes the metadata.
π add_file
add_file
Adds a file to todayβs folder (auto-created if missing).
βοΈ update_file_content
update_file_content
Edits a file only if it's in today's folder. Older notes are immutable.
π get_file_content
get_file_content
Decrypts and returns content if password matches.
get_json_metadata
get_json_metadata
Returns metadata (folder + file structure) as a JSON string.
π Security Model
- All data is encrypted using AES (via well-audited Rust crypto libraries)
- No plaintext or filesystem traces β everything is embedded in
.clog - Zero access without password
- Only today's entries can be changed β a form of cryptographic journaling discipline
β‘ Example Usage
use *;
let clog_path = "my_journal.clog";
let password = "super_secure_password";
// Step 1: Create a new encrypted journal
add_new_user;
// Step 2: Add today's note
add_file;
// Step 3: Read it back
let content = get_file_content;
println!;
// Step 4: Get metadata
let metadata = get_json_metadata;
println!;
π License
MIT Β© 2025 Deep Gajjar
π€ Contributions
PRs, issues, and feedback are welcome.