Created
March 9, 2024 20:58
-
-
Save streamingdv/77c58b365e3782b92f49da9e05adb847 to your computer and use it in GitHub Desktop.
PSN base64 account id converter
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
| import base64 | |
| # Your example Base64 encoded account ID | |
| encoded_user_id = "ppppppppppp=" | |
| # First, decode the Base64 string to bytes | |
| user_id_bytes = base64.b64decode(encoded_user_id) | |
| # Then, convert the bytes back to an integer | |
| # Ensure you use the same byte order ("little" in this case) as you used when encoding | |
| user_id = int.from_bytes(user_id_bytes, "little") | |
| print(user_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment