Skip to content

Commit

Permalink
raname package to encryptedfs
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Apr 21, 2024
1 parent e5d89c1 commit 8a34222
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 81 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "encrypted_fs"
name = "encryptedfs"
description = "An encrypted file system that mounts with FUSE on Linux. It can be used to create encrypted directories."
version = "0.1.21"
version = "0.1.22"
edition = "2021"
license = "Apache-2.0"
authors = ["Radu Marias <[email protected]>"]
repository = "https://github.com/radumarias/encrypted_fs"
repository = "https://github.com/radumarias/encryptedfs"
readme = "README.md"
keywords = ["filesystem", "fuse", "encryption", "system", "security"]
categories = ["cryptography", "filesystem"]
documentation = "https://docs.rs/encrypted_fs"
documentation = "https://docs.rs/encryptedfs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ It can then safely backup the encrypted folder on an untrusted server without wo
You can also store it in any clound storage like Google Drive, Dropbox, etc. and have it synced across multiple devices.

\
[![encrypted_fs-bin](https://img.shields.io/aur/version/encrypted_fs-bin?color=1793d1&label=encrypted_fs-bin&logo=arch-linux)](https://aur.archlinux.org/packages/encrypted_fs-bin/)
![crates.io](https://img.shields.io/crates/v/encrypted_fs.svg)
![docs.rs](https://img.shields.io/docsrs/encrypted_fs?label=docs.rs)
[![encryptedfs-bin](https://img.shields.io/aur/version/encryptedfs-bin?color=1793d1&label=encryptedfs-bin&logo=arch-linux)](https://aur.archlinux.org/packages/encryptedfs-bin/)
![crates.io](https://img.shields.io/crates/v/encryptedfs.svg)
![docs.rs](https://img.shields.io/docsrs/encryptedfs?label=docs.rs)

# Usage

You can use it as a command line tool to mount an encrypted file system. or directly using the library to build your own binary (for library, you can follow the [documentation](https://docs.rs/encrypted_fs/latest/encrypted_fs/)).
You can use it as a command line tool to mount an encrypted file system. or directly using the library to build your own binary (for library, you can follow the [documentation](https://docs.rs/encryptedfs/latest/encryptedfs/)).

## Command Line Tool

Expand All @@ -21,14 +21,14 @@ You can use it as a command line tool to mount an encrypted file system. or dire
You can install the encrypted file system binary using the following command:
```bash
yay -Syu
yay -S encrypted_fs
yay -S encryptedfs
```

### Install with cargo

You can install the encrypted file system binary using the following command:
```bash
cargo install encrypted_fs
cargo install encryptedfs
```

To use the encrypted file system, you need to have FUSE installed on your system. You can install it by running the following command (or based on your distribution):
Expand All @@ -39,7 +39,7 @@ sudo apt-get -y install fuse3
A basic example of how to use the encrypted file system is shown below:

```
encrypted_fs --mount-point MOUNT_POINT --data-dir DATA_DIR
encryptedfs --mount-point MOUNT_POINT --data-dir DATA_DIR
```
Where `MOUNT_POINT` is the directory where the encrypted file system will be mounted and `DATA_DIR` is the directory where the encrypted data will be stored.\
It will prompt you to enter a password to encrypt/decrypt the data.
Expand All @@ -52,7 +52,7 @@ This is done by decrypting the key with the old password and re-encrypting it wi

To change the password, you can run the following command:
```bash
encrypted_fs --change-password --data-dir DATA_DIR
encryptedfs --change-password --data-dir DATA_DIR
```
Where `DATA_DIR` is the directory where the encrypted data is stored.\
It will prompt you to enter the old password and then the new password.
Expand All @@ -65,7 +65,7 @@ You can specify the encryption algorithm and derive key hash rounds adding these
--cipher CIPHER --derive-key-hash-rounds ROUNDS
```
Where `CIPHER` is the encryption algorithm and `ROUNDS` is the number of rounds to derive the key hash.\
You can check the available ciphers with `encrypted_fs --help`.
You can check the available ciphers with `encryptedfs --help`.

Default values are `ChaCha20` and `600_000` respectively.

Expand Down
1 change: 0 additions & 1 deletion examples/cryptostream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::io::{Read, Write};
use base64::decode;
use cryptostream::{read, write};
use openssl::symm::Cipher;
use encrypted_fs::encrypted_fs::crypto_util::{decrypt_string, encrypt_string};

fn main() {
// This is the cipher text, base64-encoded to avoid any whitespace munging. In this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use fuser::TimeOrNow::Now;
use libc::{EBADF, EIO, ENOENT, ENOTDIR, ENOTEMPTY};
use log::{debug, warn};

use crate::encrypted_fs::{EncryptedFs, EncryptionType, FsError, FsResult};
use crate::encryptedfs::{EncryptedFs, EncryptionType, FsError, FsResult};

const BLOCK_SIZE: u64 = 512;

Expand Down
2 changes: 1 addition & 1 deletion examples/fuse3_hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use futures_util::stream::Iter;
use tracing::Level;

mod aes_stream_with_writer_seek;
pub mod encrypted_fs_fuse;
pub mod encryptedfs_fuse;

const CONTENT: &str = "hello world\n";

Expand Down
6 changes: 3 additions & 3 deletions examples/fuser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use std::str::FromStr;
use clap::{Arg, ArgAction, Command, crate_version};
use fuser::MountOption;
use strum::IntoEnumIterator;
use encrypted_fs::encrypted_fs::Cipher;
use crate::encrypted_fs_fuse::EncryptedFsFuse;
use encryptedfs::encryptedfs::Cipher;
use crate::encryptedfs_fuse::EncryptedFsFuse;

mod encrypted_fs_fuse;
mod encryptedfs_fuse;

fn main() {
let matches = Command::new("hello")
Expand Down
10 changes: 5 additions & 5 deletions examples/kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ async fn main() {
let sout = std::fs::OpenOptions::new()
.write(true)
.create(true)
.open("encrypted_fs.out")
.open("encryptedfs.out")
.unwrap();
let serr = std::fs::OpenOptions::new()
.write(true)
.create(true)
.open("encrypted_fs.err")
.open("encryptedfs.err")
.unwrap();
let mut child = Command::new("/home/gnome/dev/RustroverProjects/encrypted_fs/target/debug/encrypted_fs")
let mut child = Command::new("/home/gnome/dev/RustroverProjects/encryptedfs/target/debug/encryptedfs")
.stdout(sout)
.stderr(serr)
.env("ENCRYPTED_FS_PASSWORD", "pass-42")
.arg("--mount-point")
.arg("/home/gnome/encrypted_fs")
.arg("/home/gnome/encryptedfs")
.arg("--data-dir")
.arg("/home/gnome/encrypted_fs_data")
.arg("/home/gnome/encryptedfs_data")
.arg("--umount-on-start")

.spawn()
Expand Down
Loading

0 comments on commit 8a34222

Please sign in to comment.