Fixes Patches Creation & More

Working with files / Paths fixed

Websocket PingPongs (There is no data behind this just PingPong)

Storing User Profiles correctly

Added necessary dependencies and initial code support for: - X.509
certificate handling via x509/pkcs8 crates - Key generation and crypto
operations via x448/sha2 - Structured hex encoding and base64 encoding
This commit is contained in:
Alex Emmet 2025-09-23 20:26:48 +00:00
commit 0d07ddf851
23 changed files with 887 additions and 266 deletions

View file

@ -18,8 +18,8 @@ pub fn mod_user(storage_owner: Uuid, contact: &Contact) {
};
for i in 0..contacts.len() {
if contacts[i]["userID"].as_str() == Some(&contact.user_id.unwrap().to_string()) {
contacts.remove(stringify!("{}", i));
if contacts[i]["user_id"].as_str() == Some(&contact.user_id.unwrap().to_string()) {
contacts.array_remove(i);
break;
}
}
@ -37,7 +37,7 @@ pub fn get_user(storage_owner: Uuid, user_id: Uuid) -> Option<Contact> {
if let Ok(contacts) = json::parse(&s) {
for i in 0..contacts.len() {
if let Some(uid) = contacts[i]["userID"].as_str() {
if let Some(uid) = contacts[i]["user_id"].as_str() {
if Uuid::parse_str(uid).ok()? == user_id {
return Option::from(Contact::from_json(&contacts[i]));
}