Update dependencies and refactor encryption logic

Updates multiple dependencies to their latest versions in Cargo.lock and Cargo.toml.
Refactors encryption logic to use updated getrandom API.
Improves tray speed rate display by using ab_glyph for font rendering.
This commit is contained in:
Tunglies
2025-03-06 18:56:31 +08:00
parent 6925adc66f
commit 684128ca68
5 changed files with 809 additions and 379 deletions

View File

@@ -16,7 +16,7 @@ pub fn encrypt_data(data: &str) -> Result<String, Box<dyn std::error::Error>> {
// Generate random nonce
let mut nonce = vec![0u8; NONCE_LENGTH];
getrandom::getrandom(&mut nonce)?;
getrandom::fill(&mut nonce)?;
// Encrypt data
let ciphertext = cipher