You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-2
Original file line number
Diff line number
Diff line change
@@ -60,5 +60,46 @@ Deconstructed : 1547567141880
60
60
```
61
61
62
62
### What is a snowflake?
63
-
Snowflakes are strings that range from 14 to 19 characters long that can give every user it's unique idea. You can't get much data with just a snowflake, but you can get the creation date of the snowflake and identify every unique user with it.
64
-

63
+
Snowflakes are strings that range from 14 to 19 characters long that can give every user it's unique ID. You can't get much data with just a snowflake, but you can get the creation date of the snowflake and identify every unique user with it.
64
+
```
65
+
#--[ Example on how snowflakes work using Discord's Epoch ]--#
Number of MS since Discord's Epoch internal internal incremented for
72
+
(the first second of 2015) worker process every generated ID
73
+
| to decimal ID ID on that process
74
+
↓
75
+
12770981096
76
+
| +1420070400000
77
+
↓ Discord Epoch (unix timestamp in ms)
78
+
1432841381096
79
+
| Parse unix timestamp (ms)
80
+
↓
81
+
2015-05-28T19:29:41.096Z UTC
82
+
```
83
+
84
+
### What is a token?
85
+
Tokens are almost always used to access an API, tokens are (almost) always secret and only available to be viewed by the creator of the token. Snowflakey makes tokens that exist out of 3 parts: the user's ID, the current time and a Hmac hash. Below is an example on how it works
0 commit comments