generated from pure_sagacity/rust-starter
added database stuff
added clap arguments added the gen_or_get_key func in lib git ignore for .env migrations
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
use chacha20poly1305::{
|
||||
ChaCha20Poly1305, Key, Nonce,
|
||||
ChaCha20Poly1305,
|
||||
aead::{Aead, Generate, KeyInit},
|
||||
};
|
||||
|
||||
type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
|
||||
|
||||
mod helper {
|
||||
pub type Key = chacha20poly1305::Key;
|
||||
pub type Nonce = chacha20poly1305::Nonce;
|
||||
|
||||
pub mod helper {
|
||||
use super::{Generate, Key, Nonce};
|
||||
pub fn gen_nonce() -> Nonce {
|
||||
Nonce::generate()
|
||||
|
||||
Reference in New Issue
Block a user