add: app_data api

This commit is contained in:
trisua 2025-07-17 13:34:10 -04:00
parent 5c520f4308
commit f423daf2fc
38 changed files with 410 additions and 91 deletions

View file

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