Work on inbound/outbound consume code

This commit is contained in:
Mathias Hall-Andersen
2019-08-27 22:20:22 +02:00
parent cdbcd55eda
commit e5f515098a
3 changed files with 69 additions and 8 deletions

View File

@@ -44,6 +44,7 @@ pub struct EncryptionState {
pub struct DecryptionState<T: Opaque, S: Callback<T>, R: Callback<T>, K: KeyCallback<T>> {
pub key: [u8; 32],
pub keypair: Weak<KeyPair>,
pub confirmed: AtomicBool,
pub protector: spin::Mutex<AntiReplay>,
pub peer: Weak<PeerInner<T, S, R, K>>,
pub death: Instant, // time when the key can no longer be used for decryption