SecretKeySpec key = new SecretKeySpec(KEY_BYTES, "AES");
Cipher cipher = Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE, key);
byte[] decoded = decode(encryptedKey);
byte[] plainText = new byte[cipher.getOutputSize(decoded.length)];
int ptLength = cipher.update(decoded, 0, decoded.length, plainText, 0);
ptLength += cipher.doFinal(plainText, ptLength);
return new String(plainText).substring(0, ptLength);
}
private String encode(byte[] bytes)