Merge branch 'master' of https://git.ez-pp.farm/EZPPFarm/EZPPLauncher
This commit is contained in:
@@ -720,7 +720,6 @@ pub async fn has_net8() -> bool {
|
||||
is_net8_installed().await
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tauri::command]
|
||||
pub fn encrypt_string(string: String, entropy: String) -> String {
|
||||
let encrypted = encrypt_password(&string, &entropy);
|
||||
@@ -730,10 +729,3 @@ pub fn encrypt_string(string: String, entropy: String) -> String {
|
||||
Err(_) => string,
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: should not be called by tauri on non windows systems, return the string nonthenless
|
||||
#[cfg(not(windows))]
|
||||
#[tauri::command]
|
||||
pub fn encrypt_string(string: String, _entropy: String) -> String {
|
||||
string
|
||||
}
|
||||
|
@@ -308,6 +308,11 @@ pub async fn is_net8_installed() -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
pub fn encrypt_password(password: &str, _entropy: &str) -> Result<String, String> {
|
||||
Ok(password.to_string())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn encrypt_password(password: &str, entropy: &str) -> Result<String, String> {
|
||||
use base64::{Engine as _, engine::general_purpose};
|
||||
|
Reference in New Issue
Block a user