-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for "full" and "lite" version
- Conditional compiling if you want to use one code or another. - Added belT algorithm
- Loading branch information
1 parent
216694a
commit 2df5114
Showing
7 changed files
with
168 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// "full" feature is a free edition for allsum that uses all checksums avaliable | ||
// on rust. I'ts made for users with better storage. | ||
|
||
// sorting code for play.rust-lang.org: | ||
|
||
/* | ||
fn main() { | ||
let mut vector = vec!["crc32", "md5", "sha1", "sha256", "sha512"]; | ||
vector.sort(); | ||
println!("{:?}", vector) | ||
} | ||
*/ | ||
|
||
#[cfg(feature="full")] // FULL VERSION | ||
#[tauri::command] | ||
pub fn algorithms_selector_string() -> String{ | ||
// to avoid unnecesary sort functions, sort this outside if you want | ||
let enabled_algorithms:Vec<&str> = vec!["belT", "blake3", "crc32", "md5", "sha1", "sha256", "sha512", "whirlpool"]; | ||
let mut innerHTML:String = String::new(); | ||
for algorithmTag in enabled_algorithms{ | ||
innerHTML.push_str(format!("<option value={}>{}</option>\n", algorithmTag, algorithmTag).as_str()) | ||
} | ||
innerHTML | ||
} | ||
|
||
#[cfg(not(feature="full"))] // essentials VERSION | ||
#[tauri::command] | ||
pub fn algorithms_selector_string() -> String{ | ||
// to avoid unnecesary sort functions, sort this outside | ||
let enabled_algorithms:Vec<&str> = vec!["crc32", "md5", "sha1", "sha256", "sha512"]; // to avoid unnecesary sort functions, sort this outside | ||
let mut innerHTML:String = String::new(); | ||
for algorithmTag in enabled_algorithms{ | ||
innerHTML.push_str(format!("<option value={}>{}</option>\n", algorithmTag, algorithmTag).as_str()) | ||
} | ||
innerHTML | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters