Clean up HentaiNexus (#737)
This commit is contained in:
parent
0d1497285f
commit
28b71a2648
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = "HentaiNexus"
|
extName = "HentaiNexus"
|
||||||
extClass = ".HentaiNexus"
|
extClass = ".HentaiNexus"
|
||||||
extVersionCode = 6
|
extVersionCode = 7
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.util.Base64
|
||||||
object HentaiNexusUtils {
|
object HentaiNexusUtils {
|
||||||
fun decryptData(data: String): String = decryptData(Base64.decode(data, Base64.DEFAULT))
|
fun decryptData(data: String): String = decryptData(Base64.decode(data, Base64.DEFAULT))
|
||||||
|
|
||||||
private val primeNumbers = listOf(2, 3, 5, 7, 11, 13, 17, 19)
|
private val primeNumbers = intArrayOf(2, 3, 5, 7, 11, 13, 17, 19)
|
||||||
|
|
||||||
private fun decryptData(data: ByteArray): String {
|
private fun decryptData(data: ByteArray): String {
|
||||||
val keyStream = data.slice(0 until 64).map { it.toUByte().toInt() }
|
val keyStream = data.slice(0 until 64).map { it.toUByte().toInt() }
|
||||||
|
@ -52,7 +52,7 @@ object HentaiNexusUtils {
|
||||||
digest[n] = temp
|
digest[n] = temp
|
||||||
|
|
||||||
xorKey = digest[(n + digest[(k + digest[(xorKey + p) % 256]) % 256]) % 256]
|
xorKey = digest[(n + digest[(k + digest[(xorKey + p) % 256]) % 256]) % 256]
|
||||||
append((ciphertext[i].toUByte().toInt() xor xorKey).toChar())
|
append((ciphertext[i] xor xorKey).toChar())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue