Guest User

Untitled

a guest
Feb 16th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. @POST("e/xam/ple")
  2. Call<Object> m3550a(@Header("Content-Type") String str, @Body String str2);
  3.  
  4. public static String j(Context context) {
  5. try {
  6. return aa.a(context);
  7. } catch (Exception e2) {
  8. e2.printStackTrace();
  9. return a;
  10. }
  11. }
  12.  
  13. public static String a(byte[] bArr) {
  14. char[] cArr = new char[(bArr.length * 2)];
  15. for (int i = 0; i < bArr.length; i++) {
  16. int i2 = bArr[i] & 255;
  17. int i3 = i * 2;
  18. cArr[i3] = c[i2 >>> 4];
  19. cArr[i3 + 1] = c[i2 & 15];
  20. }
  21. return new String(cArr);
  22. }
  23.  
  24. public class C1355f {
  25. /* renamed from: a */
  26. public static String f3576a = "MIGfMA0GCSqGSIb3DQEBAQUAA4GSADCBiQKBgQCVSNDQlVBMy2Wh4J3usfQydpwIzY6FwqDwV0Dd+Bk6PA5sc3usQ8mmjLiI2YD1RDv4jjvmAdkXK+HXuxm2fI6XeIQvgnPRaaj9yNcJnFNViogidcFO7Kg2YYj8yj6DgnCkAtgJeUx2DVvyPnv+Vk1q37Tg4qW0dEFNkWL9hKXGSwIDAQAB";
  27.  
  28. /* renamed from: a */
  29. public static byte[] m3787a(String str, String str2) throws Exception {
  30. try {
  31. str = C1355f.m3786a(str);
  32. str2 = str2.getBytes("UTF8");
  33. byte[] bArr = new byte[16];
  34. Arrays.fill(bArr, (byte) 0);
  35. AlgorithmParameterSpec ivParameterSpec = new IvParameterSpec(bArr);
  36. Cipher instance = Cipher.getInstance("AES/CBC/PKCS5Padding");
  37. instance.init(1, str, ivParameterSpec);
  38. return instance.doFinal(str2);
  39. } catch (String str3) {
  40. throw new Exception(str3);
  41. }
  42. }
  43.  
  44. /* renamed from: a */
  45. public static SecretKeySpec m3786a(String str) throws UnsupportedEncodingException {
  46. Object obj = new byte[16];
  47. Arrays.fill(obj, (byte) 0);
  48. str = str.getBytes("UTF-8");
  49. System.arraycopy(str, 0, obj, 0, str.length < obj.length ? str.length : obj.length);
  50. return new SecretKeySpec(obj, "AES");
  51. }
  52.  
  53. /* renamed from: a */
  54. public static byte[] m3788a(byte[] bArr, String str) throws Exception {
  55. bArr = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(bArr));
  56. Cipher instance = Cipher.getInstance("RSA/ECB/PKCS1Padding");
  57. instance.init(1, bArr);
  58. return instance.doFinal(str.getBytes());
  59. }
  60. }
  61.  
  62. private byte[] f8405h = new byte[0];
  63. Base64.encodeToString(this.f8405h, 2)
Add Comment
Please, Sign In to add comment