π‘οΈ clog β Cryptographically Secure Daily Journal/Diary
clog is a Rust crate for safely creating, storing, and updating daily notes or any content using cryptographically secure methods. All files and metadata are stored in a single encrypted .clog(or custom file extension) file, making your private thoughts or sensitive content both secure and portable. Without the correct password, no content can be accessed.
This crate is ideal for diary writing, private note-taking, or storing content, where privacy and tamper-resistance are essential.
β¨ Features
- π End-to-end password-based encryption
- π Entries organized in auto-created date-based folders (
dd/mm/yyyy) - π Only entries inside today's folder can be edited
- π All content (notes + metadata) stored in a single encrypted file
- π₯ Multi-user support
- π§Ύ Clean JSON metadata export for backup or syncing
π¦ Installation
Add this to your Cargo.toml:
[]
= "0.0.1"
π§ Exposed API
β Add New User
add_new_user
Creates a new encrypted .clog(or custom file extension) file with a user.
π Add a Folder
add_folder
Creates a new folder for the current date. Automatically handled internally.
π Add a Note
add_file
Adds a note to todayβs folder (dd/mm/yyyy). Creates the folder if missing.
βοΈ Edit a Note
update_file_content
Replaces content of a note inside today's folder only. Older notes are read-only.
π Read a Note
get_file_content
Decrypts and returns note content if the password is correct.
π§ Get JSON Metadata
get_json_metadata
Returns stripped metadata as a clean JSON string.
π§± Metadata Structure
Internally, metadata is securely stored in the .clog(or custom file extension) file. It looks like this (JSON):
foldersβ contains all journal folders by date.- Each note includes
created_atin"%I:%M:%S %p"format (e.g.,08:15:02 AM). - Top-level
created_atmarks the file's creation date.
π Security Model
- Uses AES encryption from trusted Rust crypto libraries.
- All content β notes + metadata β encrypted in one file.
- Without password, nothing is accessible.
- Only today's entries are editable β older entries are locked.
π Example Usage
use *;
let clog_path = "my_journal.clog";
let password = "super_secure_password";
// Step 1: Create your secure journal
add_new_user;
// Step 2: Add a new entry
add_file;
// Step 3: Read it later
let content = get_file_content;
println!;
// Step 4: View metadata
let metadata = get_json_metadata;
println!;
π License
MIT Β© 2025 Deep Gajjar
π€ Contributions
PRs and suggestions are welcome! Let's make encrypted journaling elegant and secure.