obfuscKey Example

  • I'm new to encryption.  What would be a good example of an Obfusc Key for Android?

  • Hi,

    you can use any key with 8 alphanumerical characters. You can generate these online, if you wish to. An example would be: 4g9a2z38

    From the scripting reference:

    56+8 bit key for encrypting the JSON string: 8 characters, do not use code characters (=.,? etc) and play-test that your key actually works! on Windows Phone this key must be exactly 16 characters (128 bit) long. SAVE THIS KEY SOMEWHERE ON YOUR END, SO IT DOES NOT GET LOST ON UPDATES

  • @Baroni said in "obfuscKey" Example:


    I Can't set any obfusc key:

    FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
    System.Convert.FromBase64_Decode (System.Char* startInputPtr, System.Int32 inputLength, System.Byte* startDestPtr, System.Int32 destLength) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Convert.FromBase64CharPtr (System.Char* inputPtr, System.Int32 inputLength) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Convert.FromBase64String (System.String s) (at <437ba245d8404784b9fbab9b439ac908>:0)
    SIS.DBManager.Decrypt (System.String toDecrypt) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:762)
    SIS.DBManager.Read () (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:645)
    SIS.DBManager.InitDB () (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:102)
    SIS.DBManager.Init () (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:88)
    SIS.IAPManager.Awake () (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:116)

    What the problem? UNity 2019.4.0

  • You started the application before, without encryption. There is a local unencrypted file, which you are now trying to decrypt. This doesn't work, because the file cannot be read with your encryption key.

    You have to clear your local database before toggling encryption. As mentioned in the documentation pdf, page 8:

    Window > Simple IAP System > Clear Database

    Then try again.

Log in to reply