Hello, I have a question, person 1 and 2 has uids.
I want to generate a third uid from the first two ids. This new ID should always be the same for only these two id combo and not any other combo.
Any ideas?
thirdUid = firstUid + '|' + secondUid;
š
Or doing an XOR on both values
Thankyou @Steven.... But I require the third uid to be order independent from the first two
First+sec , sec+first should yeild the same unique result
Xor should work then
What is xor?
Exclusive or.
You can probably search online for stuff like this. You're looking for a hashing algorithm where order doesn't matter
I can do that with two, appwrite unique.IDs ?
Yes
Recommended threads
- Cannot Update Empty oneToMany Relationsh...
Appwrite's `updateDocument()` API cannot update an empty oneToMany relationship array. When attempting to update an empty relationship with a single-item array,...
- Domain Verification Failed - Fastly Conf...
I am trying to add my subdomain api.getmyself.app to my Custom Domain, but I keep getting the error: Domain 'getmyself.app' is owned by another customer I have...
- Data not loading at the frontend
My App that has been working for weeks, ain't loading anything at the frontend anymore. I thought maybe the API key expired but it's not the case. Users are log...