Created
November 10, 2016 15:36
-
-
Save random-robbie/9f8677bc22ccf33394f5cdba17e6b48a to your computer and use it in GitHub Desktop.
uktvnow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.livetv.android.apps.uktvnow.utils; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import javax.crypto.Cipher; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.NoSuchPaddingException; | |
import java.security.Key; | |
import java.security.spec.AlgorithmParameterSpec; | |
public class b { | |
private static IvParameterSpec a; | |
private static SecretKeySpec b; | |
private static Cipher c; | |
static { | |
a = new IvParameterSpec("J842fou5TZ!toX8b".getBytes()); | |
b = new SecretKeySpec("2s7Oc5*D13kljsd^".getBytes(), "AES"); | |
try { | |
c = Cipher.getInstance("AES/CBC/NoPadding"); | |
return; | |
} catch(NoSuchAlgorithmException localNoSuchAlgorithmException1) { | |
localNoSuchAlgorithmException1.printStackTrace(); | |
return; | |
} catch(NoSuchPaddingException localNoSuchPaddingException2) { | |
localNoSuchPaddingException2.printStackTrace(); | |
} | |
} | |
public static byte[] a(String p1) { | |
if((p1 == null) || (length() == 0)) { | |
throw new Exception("Empty string"); | |
} | |
try { | |
c.init(0x2, b, a); | |
c = c.doFinal(b(p1)); | |
} catch(Exception localString1) { | |
throw new Exception("error" + localString1.getMessage()); | |
} | |
return length(); | |
} | |
public static byte[] b(String p1) { | |
if(p1 == null) { | |
return null; | |
} | |
if(length() >= 0x2) { | |
0x2 = length() / 0x2; | |
length() = new byte[0x2]; | |
for(int = 0x0; 0x0 < 0x2; 0x0 = 0x0 + 0x1) { | |
length()[0x0] = (byte)Integer.parseInt(substring((0x0 * 0x2), ((0x0 * 0x2) + 0x2)), 0x10); | |
} | |
} | |
return null; | |
} | |
public static byte[] a(byte[] p1) { | |
// :( Parsing error. Please contact me. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment