- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
45 lines
1.5 KiB
Java
45 lines
1.5 KiB
Java
package com.amazonaws.auth;
|
|
|
|
import java.io.File;
|
|
import java.io.FileInputStream;
|
|
import java.io.FileNotFoundException;
|
|
import java.io.IOException;
|
|
import java.util.Properties;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class PropertiesCredentials implements AWSCredentials {
|
|
public final String accessKey;
|
|
public final String secretAccessKey;
|
|
|
|
@Override // com.amazonaws.auth.AWSCredentials
|
|
public String getAWSAccessKeyId() {
|
|
return this.accessKey;
|
|
}
|
|
|
|
@Override // com.amazonaws.auth.AWSCredentials
|
|
public String getAWSSecretKey() {
|
|
return this.secretAccessKey;
|
|
}
|
|
|
|
public PropertiesCredentials(File file) {
|
|
if (!file.exists()) {
|
|
throw new FileNotFoundException("File doesn't exist: " + file.getAbsolutePath());
|
|
}
|
|
FileInputStream fileInputStream = new FileInputStream(file);
|
|
try {
|
|
Properties properties = new Properties();
|
|
properties.load(fileInputStream);
|
|
if (properties.getProperty("accessKey") == null || properties.getProperty("secretKey") == null) {
|
|
throw new IllegalArgumentException("The specified file (" + file.getAbsolutePath() + ") doesn't contain the expected properties 'accessKey' and 'secretKey'.");
|
|
}
|
|
this.accessKey = properties.getProperty("accessKey");
|
|
this.secretAccessKey = properties.getProperty("secretKey");
|
|
} finally {
|
|
try {
|
|
fileInputStream.close();
|
|
} catch (IOException unused) {
|
|
}
|
|
}
|
|
}
|
|
}
|