Time Hash Code (THC) is an Apple Shortcut designed to quickly generate unique IDs based on the current date and time. It uses the MD5 hashing algorithm to create these IDs.
- π Capture Current Date and Time: THC records the precise current date and time.
- π Generate MD5 Hash: It creates an MD5 hash from this date and time.
- π Extract Unique ID: The first 10 digits of the hash are used as the unique ID.
Use this unique ID in various scenarios, such as:
- π Creating database records
- π Logging events
- ποΈ Naming files uniquely
- π€ Generating usernames
π‘ Tip: Donβt like the generated ID? Simply wait a second and try again for a new one!
Follow these steps to set up THC on your iPhone:
-
π₯ Import the Shortcut:
Go to the Releases section of this repository to find the download link for the shortcut. Once downloaded, add it to your Siri Shortcuts app. -
ποΈ Set Up Action Button (Optional):
If your iPhone has an Action Button, configure it for quick access:- Go to Settings β Action Button β Shortcut β Time Hash Code (THC) v1.0.1
You can configure the number of characters for the generated unique ID. By default, THC generates a 10-character ID, but you can customize this up to a maximum of 32 characters.
To adjust the length:
- Open Shortcuts.
- Find Time Hash Code (THC).
- Hold the shortcut and select Edit.
- Scroll down to the comment that says:
βChange the "10" below if you want a longer string. Maximum is 32.β - Modify the "10" to your desired length (between 10 and 32 characters).
π Enjoy the simplicity and functionality of Time Hash Code (THC)!