gchq / gchq/CyberChef

Feature request: Decoding UUIDs from bytes

Open
#1,624 1 comment 1 reaction 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 26m
Merged PRs (30d)
33

Description

**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`](https://docs.python.org/3/library/uuid.html#uuid.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:
```py3
>>> 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

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by reviewing the existing UUID and byte-decoding operations, then verify that the new operation handles raw UUID bytes with configurable endianness and matches the provided little-endian example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
44/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.