executor work

This commit is contained in:
John Smith
2022-06-27 23:46:29 -04:00
parent ebea72c9db
commit fdbb4c6397
59 changed files with 726 additions and 640 deletions

View File

@@ -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
}