https://github.com/webfreak001/sha1ct
sha1 hashing & uuid algorithm that works at compile time
https://github.com/webfreak001/sha1ct
Last synced: 5 months ago
JSON representation
sha1 hashing & uuid algorithm that works at compile time
- Host: GitHub
- URL: https://github.com/webfreak001/sha1ct
- Owner: WebFreak001
- Created: 2017-06-14T10:13:14.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T10:13:50.000Z (about 9 years ago)
- Last Synced: 2025-10-25T19:41:36.594Z (9 months ago)
- Language: D
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sha1ct
Compile-Time sha1
```d
import sha1ct;
enum hash = sha1Of(cast(ubyte[]) [0, 1, 2, 3]); // Binary Data
enum hash2 = sha1Of("Hello World"); // String
enum namespace = sha1UUID("my.app"); // generates a std.uuid.UUID from string or binary
enum uuid = sha1UUID("interface1", namespace); // also with namespaces
```