Last active
May 19, 2025 09:47
-
-
Save SirusDoma/e6d09139d305bb65326396b4c25daf26 to your computer and use it in GitHub Desktop.
O2Jam e-Games auth token encode/decode
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
| using System; | |
| using System.Text; | |
| public class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| // Encoding: UTF16-BE (BigEndianUnicode in C#) | |
| string encoded = "ADAAOQBEADUAQgBBADcAQwAtADUARQAyAEEALQA0ADYANQBBAC0AOQA4AEUARAAtADgAMgBDADYAOAA1AEEARgAxAEYAMQA4"; | |
| string decoded = "09D5BA7C-5E2A-465A-98ED-82C685AF1F18"; | |
| // Decode | |
| var decodedPayload = Convert.FromBase64String(encoded); | |
| Console.WriteLine(Encoding.BigEndianUnicode.GetString(decodedPayload)); // == decoded | |
| // Encode | |
| var rawPayload = Encoding.BigEndianUnicode.GetBytes(decoded); | |
| Console.WriteLine(Convert.ToBase64String(rawPayload)); // == encoded | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment