Created
February 13, 2025 05:09
-
-
Save Synesso/2af359b7de460acd5cc13414a23041a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun minuteOfDay(token: String) = | |
MessageDigest.getInstance("SHA-256") | |
.digest(token.toByteArray()) | |
.fold(0) { acc, byte -> (acc shl 8) or (byte.toInt() and 0xFF) } % 1440 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment