Tuesday, 25 May 2021

Could not generate secret key using PBEKeySpec

I have below code and when I try to run it on emulator. it throws an error: Could not generate secret key. the code looks like this:

          byte[] f1618r = grbge(878).getBytes();
          String y = "27159";
          String f1621u = new String(Base64.decode(f1619s, 2)); 
          String f1620t = new String(Base64.decode(f1618r, 0)); 
           String f1626z = (f1620t + grbge(883) + y + f1621u);
            byte[] decode = Base64.decode(grbge(699), 0);

            SecretKeySpec secretKeySpec = new
                    SecretKeySpec(m749r(f1622v, f1626z),grbge(895));
            Cipher instance = Cipher.getInstance(grbge(896));
            instance.init(2, secretKeySpec, new
                    IvParameterSpec(grbge(897).getBytes()));

             String mypass =  new String(instance.doFinal(decode), grbge(898));

          

complete code uploaded here: https://controlc.com/7524e20b

  • Edit: I tried to minify the code so as to post it here and make the question self-contained but unfortunately I was unable to reach it. But please try to look at the above link.

The function grbge(int grb) returns a string. in the case of the key generation it returns an empty string which eventually processed by PBEKeySpec and it is not accepting an empty string in this case. How can I solve this?



from Could not generate secret key using PBEKeySpec

No comments:

Post a Comment