| Crates.io | clog_rs |
| lib.rs | clog_rs |
| version | 1.0.1 |
| created_at | 2025-05-26 08:16:27.949368+00 |
| updated_at | 2025-05-30 10:18:23.034641+00 |
| description | A cryptographically secure content storing library. Provides simple APIs to create, read, and edit files without compromising security. |
| homepage | |
| repository | https://github.com/Levi477/clog |
| max_upload_size | |
| id | 1689104 |
| size | 55,369 |
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.
Try the terminal-based daily diary built with
clog_rs:
π clog-tui v1.3.0
25/05/2025).clog fileInstead of using actual folders and files on disk, clog creates a virtual file system inside a .clog file.
Suppose you write two entries on different dates:
25/05/2025: morning-thoughts and evening-reflection24/05/2025: goalsAll of this is stored inside my_journal.clog like so:
{
"folders": {
"25/05/2025": {
"morning-thoughts": {
"created_at": "08:15:02 AM"
},
"evening-reflection": {
"created_at": "08:55:42 PM"
}
},
"24/05/2025": {
"goals": {
"created_at": "03:31:12 PM"
}
}
},
"created_at": "24/05/2025"
}
π Note: All this lives inside a single .clog file β portable, encrypted, and compact.
Add to your Cargo.toml:
[dependencies]
clog_rs = "1.0.1"
or use
cargo add clog_rs
add_new_useradd_new_user(password: &str, clogfile_path: &str)
Creates a new encrypted .clog file and initializes the metadata.
add_fileadd_file(password: &str, clogfile_path: &str, filename: &str, file_content: &str)
Adds a file to todayβs folder (auto-created if missing).
update_file_contentupdate_file_content(
password: &str,
clogfile_path: &str,
filename: &str,
foldername: &str,
new_file_content: &str,
)
Edits a file only if it's in today's folder. Older notes are immutable.
get_file_contentget_file_content(
password: &str,
clogfile_path: &str,
filename: &str,
foldername: &str,
) -> String
Decrypts and returns content if password matches.
get_json_metadataget_json_metadata(password: &str, clogfile_path: &str) -> String
Returns metadata (folder + file structure) as a JSON string.
.cloguse clog_rs::*;
let clog_path = "my_journal.clog";
let password = "super_secure_password";
// Step 1: Create a new encrypted journal
add_new_user(password, clog_path);
// Step 2: Add today's note
add_file(password, clog_path, "something", "Today I learned something new...");
// Step 3: Read it back
let content = get_file_content(password, clog_path, "something", "25/05/2025");
println!("Decrypted entry: {}", content);
// Step 4: Get metadata
let metadata = get_json_metadata(password, clog_path);
println!("Journal structure: {}", metadata);
MIT Β© 2025 Deep Gajjar
PRs, issues, and feedback are welcome.