aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2017-12-26 16:10:51 +0100
committerKatharina Fey <kookie@spacekookie.de>2017-12-26 16:11:46 +0100
commit77aecad1d6113a79188070c2d85e1585838a94ba (patch)
tree3fbdcd65a7e5afecc4cf2c0346b0356156658757 /src
parenta6dac682ff703c7282f260d30eee694413869ad6 (diff)
Meh
Diffstat (limited to 'src')
-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();