unity3d - Invalid LVL key! how to get LVL android key from unity? -


this code sample code in unity "google play license verification" asset.

i build project, , play form android phone. but, show me "invalid lvl key!"

i think, have change follow string varibale.

private string m_publickey_base64 = "< set base64 encoding rsa public key >"; private string m_publickey_modulus_base64 = "<set output simpleparseasn1>"; private string m_publickey_exponent_base64 = "< .. , here >"; 

but, know value m_publickey_base64, google play market.

hmm...... know i'm doing wrong?? can do? please me.

this part of cehcklblbutton sample source

public class checklvlbutton : monobehaviour {     /*      * java service binder classes.jar      */     public textasset servicebinder;  /*  * use public lvl key android market publishing section here.  */ private string m_publickey_base64 = "< set base64 encoding rsa public key >";  /*  * consider storing public key rsaparameters.modulus/.exponent rather base64 prevent asn1 parsing..  * these printed logcat below.  */ private string m_publickey_modulus_base64 = "<set output simpleparseasn1>"; private string m_publickey_exponent_base64 = "< .. , here >"; 

looking @ code on github, start() function:

    // either parse asn1-formatted public lvl key @ runtime (only available when stripping disabled)..     rsa.simpleparseasn1(m_publickey_base64, ref m_publickey.modulus, ref m_publickey.exponent);     m_publickey_modulus_base64 = system.convert.tobase64string(m_publickey.modulus);     m_publickey_exponent_base64 = system.convert.tobase64string(m_publickey.exponent);     // .. , check logcat these values ...     debug.log("private string m_publickey_modulus_base64 = \"" + m_publickey_modulus_base64 + "\";");     debug.log("private string m_publickey_exponent_base64 = \"" + m_publickey_exponent_base64 + "\";");      // .. or use pre-parsed keys (and remove code above).     m_publickey.modulus = system.convert.frombase64string(m_publickey_modulus_base64);     m_publickey.exponent = system.convert.frombase64string(m_publickey_exponent_base64);  

if replace these values

private string m_publickey_modulus_base64 = "<set output simpleparseasn1>"; private string m_publickey_exponent_base64 = "< .. , here >"; 

with actual string logcat, can delete call simpleparseasn1() , whole first section , enable stripping. can skip these values, , should work out-of-box given specified m_publickey_base64.

to understand what's going wrong app, share logcat?


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -