Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Is it possible the get google play licence key back from tangle?

Discussion in 'Unity IAP' started by okan_unity116, Sep 16, 2022.

  1. okan_unity116

    okan_unity116

    Joined:
    Oct 6, 2020
    Posts:
    4
    We needed google play license key for a third party service. While this key is already encrypted and stored in GooglePlayTangle. I didn't want to put a second unencrypted copy of the key in the project.
    GooglePlayTangle.Data() returns a byte array.
    What is format of byte array. It is possible to create license key from this array?
     
    Last edited: Sep 16, 2022
  2. John_Corbett

    John_Corbett

    Unity Technologies

    Joined:
    May 17, 2019
    Posts:
    151
    Hi @okan_unity116

    You can try to run the static DeObfuscate function in the Obfuscator of the Security module, using data from your GooglePlayTangle class.
     
  3. okan_unity116

    okan_unity116

    Joined:
    Oct 6, 2020
    Posts:
    4
    Hi @John_Corbett thank you for reply.
    As far as i see GooglePlayTangle.Data() already calling Obfuscator.DeObfuscate and it returns a byte array. This byte array doesn't looks like any known encoding. So i still can't figure out how to retrieve raw string from this array.

    Source code of GooglePlayTangle.Data()


    public static byte[] Data() {
    if (IsPopulated == false)
    return null;
    return Obfuscator.DeObfuscate(data, order, key);
    }