Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix application salt path #31

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/backend/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use trussed::{
};

use super::Error;
use crate::{Pin, PinId, BACKEND_DIR, MAX_PIN_LENGTH};
use crate::{Pin, PinId, MAX_PIN_LENGTH};

pub(crate) const SIZE: usize = 256;
pub(crate) const CHACHA_TAG_LEN: usize = 16;
Expand Down Expand Up @@ -497,10 +497,7 @@ fn pin_len(pin: &Pin) -> u8 {
fn app_salt_path() -> PathBuf {
const SALT_PATH: &str = "application_salt";

let mut path = PathBuf::new();
path.push(&PathBuf::from(BACKEND_DIR));
path.push(&PathBuf::from(SALT_PATH));
path
PathBuf::from(SALT_PATH)
}

pub(crate) fn get_app_salt<S: Filestore, R: CryptoRng + RngCore>(
Expand Down