Created
March 26, 2017 21:50
-
-
Save mzhang28/1cbc3a63152d095dca58f7b6d89a8b77 to your computer and use it in GitHub Desktop.
KeyPass Implementation
This file contains 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
chars = " FuMlX%3kBJ:.N*epqA0Lh=En/diT1cwyaz$7SH,OoP;rUsWv4g\\Z<tx(8mf>-#I?bDYC+RQ!K5jV69&)G" | |
def get_key(seed): | |
result = "" | |
seed = 16631 * (seed % 0x7fffffff) + 511115 | |
for i in range(16): | |
result += byte[seed % 0x7fffffff % 82] | |
seed = 16631 * (seed % 0x7fffffff) + 511115 | |
result += chars[seed % 0x7fffffff % 82] | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment