CrackMe.apk
Download file
package com.google.android.exoplayer2.source.hls;
import android.net.Uri;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSourceInputStream;
import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.upstream.TransferListener;
import com.google.android.exoplayer2.util.Assertions;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Map;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
class Aes128DataSource implements DataSource {
private CipherInputStream cipherInputStream;
private final byte[] encryptionIv;
private final byte[] encryptionKey;
private final DataSource upstream;
public Aes128DataSource(DataSource dataSource, byte[] bArr, byte[] bArr2) {
this.upstream = dataSource;
this.encryptionKey = bArr;
this.encryptionIv = bArr2;
}
public final void addTransferListener(TransferListener transferListener) {
Assertions.checkNotNull(transferListener);
this.upstream.addTransferListener(transferListener);
}
public final long open(DataSpec dataSpec) throws IOException {
try {
Cipher cipherInstance = getCipherInstance();
try {
cipherInstance.init(2, new SecretKeySpec(this.encryptionKey, "AES"), new IvParameterSpec(this.encryptionIv));
DataSourceInputStream dataSourceInputStream = new DataSourceInputStream(this.upstream, dataSpec);
this.cipherInputStream = new CipherInputStream(dataSourceInputStream, cipherInstance);
dataSourceInputStream.open();
return -1;
} catch (InvalidAlgorithmParameterException | InvalidKeyException e) {
throw new RuntimeException(e);
}
} catch (NoSuchAlgorithmException | NoSuchPaddingException e2) {
throw new RuntimeException(e2);
}
}
public final int read(byte[] bArr, int i, int i2) throws IOException {
Assertions.checkNotNull(this.cipherInputStream);
int read = this.cipherInputStream.read(bArr, i, i2);
if (read < 0) {
return -1;
}
return read;
}
public final Uri getUri() {
return this.upstream.getUri();
}
public final Map<String, List<String>> getResponseHeaders() {
return this.upstream.getResponseHeaders();
}
public void close() throws IOException {
if (this.cipherInputStream != null) {
this.cipherInputStream = null;
this.upstream.close();
}
}
/* access modifiers changed from: protected */
public Cipher getCipherInstance() throws NoSuchPaddingException, NoSuchAlgorithmException {
return Cipher.getInstance("AES/CBC/PKCS7Padding");
}
}
Download file