executor work
This commit is contained in:
		| @@ -1,5 +1,4 @@ | ||||
| use super::key::*; | ||||
| use crate::intf::*; | ||||
| use crate::xx::*; | ||||
| use crate::*; | ||||
| use chacha20::cipher::{KeyIvInit, StreamCipher}; | ||||
| @@ -124,7 +123,7 @@ impl Crypto { | ||||
|  | ||||
|         // Schedule flushing | ||||
|         let this = self.clone(); | ||||
|         let flush_future = interval(60000, move || { | ||||
|         let flush_future = intf::interval(60000, move || { | ||||
|             let this = this.clone(); | ||||
|             async move { | ||||
|                 if let Err(e) = this.flush().await { | ||||
| @@ -214,13 +213,13 @@ impl Crypto { | ||||
|  | ||||
|     pub fn get_random_nonce() -> Nonce { | ||||
|         let mut nonce = [0u8; 24]; | ||||
|         random_bytes(&mut nonce).unwrap(); | ||||
|         intf::random_bytes(&mut nonce).unwrap(); | ||||
|         nonce | ||||
|     } | ||||
|  | ||||
|     pub fn get_random_secret() -> SharedSecret { | ||||
|         let mut s = [0u8; 32]; | ||||
|         random_bytes(&mut s).unwrap(); | ||||
|         intf::random_bytes(&mut s).unwrap(); | ||||
|         s | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user