add: app_data api
This commit is contained in:
parent
5c520f4308
commit
f423daf2fc
38 changed files with 410 additions and 91 deletions
|
@ -33,6 +33,18 @@ pub fn salt() -> String {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn salt_len(len: usize) -> String {
|
||||
rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(len)
|
||||
.map(char::from)
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn random_id() -> String {
|
||||
hash(uuid())
|
||||
}
|
||||
|
||||
pub fn random_id_salted_len(len: usize) -> String {
|
||||
hash(uuid() + &salt_len(len))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue