mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
clippy
This commit is contained in:
committed by
Christian Visintin
parent
babbc5eadb
commit
697ab225ea
@@ -32,16 +32,16 @@ use magic_crypt::MagicCryptTrait;
|
||||
///
|
||||
/// Crypt a string using AES128; output is returned as a BASE64 string
|
||||
pub fn aes128_b64_crypt(key: &str, input: &str) -> String {
|
||||
let crypter = new_magic_crypt!(key.to_string(), 128);
|
||||
crypter.encrypt_str_to_base64(input.to_string())
|
||||
let crypter = new_magic_crypt!(key, 128);
|
||||
crypter.encrypt_str_to_base64(input)
|
||||
}
|
||||
|
||||
/// ### aes128_b64_decrypt
|
||||
///
|
||||
/// Decrypt a string using AES128
|
||||
pub fn aes128_b64_decrypt(key: &str, secret: &str) -> Result<String, magic_crypt::MagicCryptError> {
|
||||
let crypter = new_magic_crypt!(key.to_string(), 128);
|
||||
crypter.decrypt_base64_to_string(secret.to_string())
|
||||
let crypter = new_magic_crypt!(key, 128);
|
||||
crypter.decrypt_base64_to_string(secret)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user