diff options
| author | Teddy Wing | 2018-10-22 14:57:02 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-10-22 14:57:02 +0200 |
| commit | a709acca8ba41f21e0222debdbe39186c5106beb (patch) | |
| tree | 3feb79648ff0263028d860cbc1321769bcd10e0f /src/lib.rs | |
| parent | ff244b2e9b7705534ea37ff727be205274ea9ae3 (diff) | |
| download | dome-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.rs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -16,6 +16,7 @@ extern crate libc; #[macro_use] extern crate log; +extern crate magic_crypt; #[macro_use] extern crate objc; |
