Feature request: Decoding UUIDs from bytes
Nothing4You opened this issue · comments
Is your feature request related to a problem? Please describe.
It would be great to be able to decode UUIDs from bytes, similar to how this can be done with Python's UUID
.
For example, Microsoft Entra ID can be configured to link on-premises AD objects by their objectGUID
to the cloud attribute OnPremisesImmutableId
.
In this case, the OnPremisesImmutableId
will contain (as represented in Graph API) a base64 string that decodes to bytes of the UUID.
In Python, this can be decoded like this:
>>> uuid.UUID(bytes_le=base64.b64decode("yH/PGEGksEeJvkdzG0NtdQ=="))
UUID('18cf7fc8-a441-47b0-89be-47731b436d75')
Describe the solution you'd like
Adding a new operation to decode an UUID from raw.
Endianness should be configurable.
Describe alternatives you've considered
Building all the logic to properly interpret values with appropriate endianness via operations.
While this should work fine for big-endian bytes, this does not work well for little-endian bytes, unless significantly increasing complexity.
Additional context
https://en.wikipedia.org/wiki/Universally_unique_identifier
Hey!
I am want to work on it please assign this to me!
Thanks.