Convert binary to UUID from LDAP

Alexander Zhirov azhirov1991 at gmail.com
Tue Mar 28 13:48:31 UTC 2023


On Tuesday, 28 March 2023 at 13:18:59 UTC, Kagamin wrote:
> This guid is (int,short,short,byte[8]) in little endian byte 
> order. So if you want to convert it to big endian, you'll need 
> to swap bytes in those int and two shorts.
> ```
> ubyte[] guid=...
> int* g1=cast(int*)guid.ptr;
> *g1=bswap(*g1);
> ```

Yes, therefore, my option remains more correct rather than 
directly converting to UUID, since it does not correspond to the 
value specified in LDAP. Therefore, it is necessary to do byte 
permutations.


More information about the Digitalmars-d-learn mailing list