Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login anonymously #61

Open
Bumblebee202111 opened this issue Mar 9, 2024 · 0 comments
Open

Login anonymously #61

Bumblebee202111 opened this issue Mar 9, 2024 · 0 comments

Comments

@Bumblebee202111
Copy link

Bumblebee202111 commented Mar 9, 2024

private fun createUsername(deviceId: String): String {
    val key = "3go8&$8*3*3h0k(2)2".toByteArray()
    val secondString =
        deviceId.toByteArray().mapIndexed { index, oldByte -> oldByte.xor(key[index % key.size]) }
            .toByteArray().md5().encodedAsBase64String()
    return "$deviceId $secondString".toByteArray().encodedAsBase64String()
}

Ported to Kotlin by me from other's code.
Binaryify's key seems faulty.
My base URL: https://interface.music.163.com/eapi/
Sorry that I don't know Dart, and maybe you don't know Kotlin either. But I still believe the above snippet is readable enough for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant