Actualmente tengo mi app a la hora de subir a la playStore la advertencia de
Mi clase es la siguiente
public class CryptoHandler {
private String SecretKey = "DKDJXNSKDJD";
private static CryptoHandler instance = null;
public static CryptoHandler getInstance() {
if (instance == null) {
instance = new CryptoHandler();
}
return instance;
}
public String encrypt(String message) throws NoSuchAlgorithmException,
NoSuchPaddingException, IllegalBlockSizeException,
BadPaddingException, InvalidKeyException,
UnsupportedEncodingException, InvalidAlgorithmParameterException {
byte[] srcBuff = message.getBytes("UTF8");
SecretKeySpec skeySpec = new
SecretKeySpec(SecretKey.substring(0,16).getBytes(), "AES");
Cipher ecipher = Cipher.getInstance("AES/ECB/PKCS7Padding");
ecipher.init(Cipher.ENCRYPT_MODE, skeySpec);
byte[] dstBuff = ecipher.doFinal(srcBuff);
return Base64.encodeToString(dstBuff, Base64.DEFAULT);
}
public String decrypt(String encrypted) {
SecretKeySpec skeySpec = new
SecretKeySpec(SecretKey.substring(0,16).getBytes(), "AES");
Cipher ecipher = null;
try {
ecipher = Cipher.getInstance("AES/ECB/PKCS7Padding");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
}
try {
ecipher.init(Cipher.DECRYPT_MODE, skeySpec);
} catch (InvalidKeyException e) {
e.printStackTrace();
}
byte[] raw = Base64.decode(encrypted, Base64.DEFAULT);
byte[] originalBytes = new byte[0];
try {
originalBytes = ecipher.doFinal(raw);
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
String original = null;
try {
original = new String(originalBytes, "UTF8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return original;
}
}
Alguien me indica el error?