aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/security/aes.rs1
-rw-r--r--src/security/encryption.rs5
2 files changed, 1 insertions, 5 deletions
diff --git a/src/security/aes.rs b/src/security/aes.rs
index 16fb156..67a0470 100644
--- a/src/security/aes.rs
+++ b/src/security/aes.rs
@@ -19,6 +19,7 @@ pub struct AES {
}
impl AES {
+
/// Create a new AES context from a key context
pub fn new(key: &Key) -> AES {
return AES { ctx: Aes128::new_varkey(&key.data).unwrap() };
diff --git a/src/security/encryption.rs b/src/security/encryption.rs
index 2ea5842..fa478f1 100644
--- a/src/security/encryption.rs
+++ b/src/security/encryption.rs
@@ -53,11 +53,6 @@ impl CryptoHandler {
}
-/// Convert a vector of u8 into a utf-8 string
-fn vec_to_str(vec: &[u8]) -> String {
- return unsafe { String::from(from_utf8_unchecked(vec)) };
-}
-
/// Convert a utf-8 string to a vector of u8
fn str_to_vec(string: &str) -> Vec<u8> {
let mut vec: Vec<u8> = Vec::new();