Need help debugging an Android test application

poldenais

New member
Apr 7, 2018
1
0
0
Visit site
Hi,
I'm debugging a test app that stores a database with usernames and passwords.

I can list out all the usernames and passwords but the passwords are showing encrypted.

I'm trying to figure out how the passwords are encrypted thinking its using a key to AES encode but it doesn't seem to be matching up when I'm attempting to encode.

Looking at the code, if I enter the password Darcypassword, it encodes into:

bXijeXNyaMM0i+lMybbzzw==

I thought the key needed to encode this was : 76dcaa023162fdb1acca24b28bc54882

Any help would be appreciated on what Im doing wrong. Thanks in advance.

encrypt code
public String encrypt(String paramString) { try { this.cipher = Cipher.getInstance("AES"); this.cipher.init(1, this.keySpec); paramString = Base64.encodeToString(this.cipher.doFinal(paramString.getBytes()), 0); return paramString; }


[BOX]public String decrypt(String paramString)
{
paramString = Base64.decode(paramString.getBytes(), 0);
try
{
this.cipher = Cipher.getInstance("AES");
this.cipher.init(2, this.keySpec);
paramString = new String(this.cipher.doFinal(paramString), "UTF-8");
return paramString;
}[/BOX]
 

Forum statistics

Threads
943,144
Messages
6,917,507
Members
3,158,841
Latest member
kirk781