Android In App Billing: securing application public key

后端 未结 7 2405
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 09:33

From Android In App Billing version 3 (TrivialDrive)sample application coming with sdk

MainActivity.java

/* base64EncodedPublicKey should be YOUR A         


        
相关标签:
7条回答
  • 2020-12-04 10:04

    Building on Steven Craft's Answer with help i got from gidds

    Here's a cleaner code. In addition it swaps out digit (0-9) for ascii character (37-46) and vice versa. Written in Kotlin.

     val string = "Hello World 012345679 %&()"
     fun String.swapCase() = map {
            when {
                it.isUpperCase() -> it.toLowerCase()
                it.isLowerCase() -> it.toUpperCase()
                it.isDigit() -> (37 + (it.toInt() - 48)).toChar()
                it.isDefined() -> if (it.toInt() >= 37 && it.toInt() <= 46) (48 + (it.toInt() - 37)).toChar() else it
                else -> it
            }
        }.joinToString("")
        println(string.swapCase()) // hELLO wORLD %&'()*+,. 0134
    

    Use this -> https://edge-developer.github.io/BillingGenerator/ to generate all those in a fly

    0 讨论(0)
提交回复
热议问题