Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String m8317a(String str, String str2) {
- try {
- SecureRandom secureRandom = new SecureRandom();
- byte[] bArr = new byte[16];
- AlgorithmParameterSpec ivParameterSpec = new IvParameterSpec("sk7erfJeopw289dS".getBytes());
- Key secretKeySpec = new SecretKeySpec(str.getBytes("UTF-8"), "AES");
- Cipher instance = Cipher.getInstance("AES/CBC/PKCS5Padding");
- instance.init(1, secretKeySpec, ivParameterSpec);
- byte[] doFinal = instance.doFinal(str2.getBytes("UTF-8"));
- ByteBuffer allocate = ByteBuffer.allocate(doFinal.length);
- allocate.put(doFinal);
- return Base64.encodeToString(allocate.array(), 0);
- } catch (Throwable th) {
- C1861b.m8310a(th);
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement