aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2018-10-22 14:57:02 +0200
committerTeddy Wing2018-10-22 14:57:02 +0200
commita709acca8ba41f21e0222debdbe39186c5106beb (patch)
tree3feb79648ff0263028d860cbc1321769bcd10e0f /src/lib.rs
parentff244b2e9b7705534ea37ff727be205274ea9ae3 (diff)
downloaddome-key-map-a709acca8ba41f21e0222debdbe39186c5106beb.tar.bz2
trial: Encrypt and decrypt timestamp
Add functions to encrypt and decrypt a timestamp. We'll be using those functions to write the encrypted timestamp of the first trial launch date to a file. Decided to go for some light encryption instead of just storing a plain or base64-encoded value. Still need to come up with a key, but that will be stored as a plain string in the binary. Need a way to capture the results so we don't end up panicking. Trouble is, 'magic-crypt' doesn't implement the required `Error` traits, so I can't just slot it into 'error-chain'. Still trying to work out how to deal with that. Also add a function to get the days remaining from now.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8e23367..27fc7a7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -16,6 +16,7 @@ extern crate libc;
#[macro_use]
extern crate log;
+extern crate magic_crypt;
#[macro_use]
extern crate objc;