ezidam: apps: view, update, new secret
This commit is contained in:
parent
4b99905ee0
commit
2caf584cb7
12 changed files with 407 additions and 9 deletions
|
|
@ -2,6 +2,7 @@ use crate::error::Error;
|
|||
use crate::hash::{hash, Hash};
|
||||
use nanoid::nanoid;
|
||||
use nanoid_dictionary::ALPHANUMERIC;
|
||||
use std::fmt::{Display, Formatter};
|
||||
|
||||
// Struct to generate the secret
|
||||
pub struct SecretString(String);
|
||||
|
|
@ -20,6 +21,11 @@ impl AsRef<str> for SecretString {
|
|||
self.0.as_ref()
|
||||
}
|
||||
}
|
||||
impl Display for SecretString {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Secret(Hash);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue