aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-07-24 18:50:05 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-07-24 18:50:05 +0200
commitdb8328bb3b862e7424b0332f7f380877d8a1be7d (patch)
treefc00975d5b6aa60d856764e9e7b65862ed5a1ce1 /src
parentTested full handshake (diff)
downloadwireguard-rs-db8328bb3b862e7424b0332f7f380877d8a1be7d.tar.xz
wireguard-rs-db8328bb3b862e7424b0332f7f380877d8a1be7d.zip
Fix TAI64 epoch
Diffstat (limited to 'src')
-rw-r--r--src/timestamp.rs4
-rw-r--r--src/types.rs3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/timestamp.rs b/src/timestamp.rs
index 73fe91f..e8447b1 100644
--- a/src/timestamp.rs
+++ b/src/timestamp.rs
@@ -1,8 +1,8 @@
use std::time::{SystemTime, UNIX_EPOCH};
-pub type TAI64N = [u8; 12];
+const TAI64_EPOCH : u64 = 0x4000000000000000;
-const TAI64_EPOCH : u64 = 4000000000000000;
+pub type TAI64N = [u8; 12];
pub fn zero() -> TAI64N {
[0u8; 12]
diff --git a/src/types.rs b/src/types.rs
index 9ab28f5..27807f2 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -96,7 +96,6 @@ pub type Output = (
Option<KeyPair> // resulting key-pair of successful handshake
);
-// per-peer state machine
+// preshared key
pub type Psk = [u8; 32];
-