Public static String Encrypt(String value) {
Try {
byte[] bytes = value != Null ? value.getBytes(UTF8) : new byte[0];
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(sKey));
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
pbeCipher.init(1, key, new PBEParameterSpec(Settings.Secure.getString(this.context.getContentResolver(), "android_id").getBytes(UTF8), 20));
Return new String(Base64.encode(pbeCipher.doFinal(bytes), 2), UTF8);
} Catch (Exception e) {
throw new RuntimeException(e);
}
}