Convert binary to UUID from LDAP
Alexander Zhirov
azhirov1991 at gmail.com
Tue Mar 28 05:26:08 UTC 2023
On Monday, 27 March 2023 at 18:39:19 UTC, Alexander Zhirov wrote:
I mean get the UUID data type itself. Just using
> [this example](https://dlang.org/phobos/std_uuid.html#.UUID)
> `cast(ubyte[16])ubyte[]` will not work, conversion error.
```d
writeln(toHexString(cast(ubyte[])value.attributes["objectGUID"][0]));
```
When converting to HEX, I get the string
`121F4C264DED5E41A33F445B0A1CAE32`, in which some values are
reversed. I found ways on the Internet to transform the
permutation method into the desired result, but most likely it
will be a crutch rather than the right solution to lead to the
final result `264c1f12-ed4d-415e-a33f-445b0a1cae32`.
More information about the Digitalmars-d-learn
mailing list