Skip to content

Commit

Permalink
Reuse ALPHANUM
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Nov 4, 2019
1 parent 25c5572 commit b1d25e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/topjohnwu/magisk/utils/Keygen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.util.Base64
import android.util.Base64OutputStream
import com.topjohnwu.magisk.Config
import com.topjohnwu.magisk.di.koinModules
import com.topjohnwu.magisk.utils.PatchAPK.ALPHANUM
import com.topjohnwu.signing.CryptoUtils.readCertificate
import com.topjohnwu.signing.CryptoUtils.readPrivateKey
import com.topjohnwu.superuser.internal.InternalUtils
Expand Down Expand Up @@ -38,7 +39,6 @@ class Keygen: CertKeyProvider {
private const val ALIAS = "magisk"
private val PASSWORD get() = "magisk".toCharArray()
private const val TESTKEY_CERT = "61ed377e85d386a8dfee6b864bd85b0bfaa5af81"
private const val ALPHANUM = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
private const val BASE64_FLAG = Base64.NO_PADDING or Base64.NO_WRAP
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/topjohnwu/magisk/utils/PatchAPK.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object PatchAPK {
private val UPPERALPHA = LOWERALPHA.toUpperCase()
private val ALPHA = LOWERALPHA + UPPERALPHA
private const val DIGITS = "0123456789"
private val ALPHANUM = ALPHA + DIGITS
val ALPHANUM = ALPHA + DIGITS
private val ALPHANUMDOTS = "$ALPHANUM............"

private fun genPackageName(prefix: String, length: Int): String {
Expand Down

0 comments on commit b1d25e0

Please sign in to comment.