public final class KeystoreHelper
extends java.lang.Object
Constructor and Description |
---|
KeystoreHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
createDebugStore(java.lang.String storeType,
java.io.File storeFile,
java.lang.String storePassword,
java.lang.String keyPassword,
java.lang.String keyAlias,
com.android.utils.ILogger logger)
Creates a new debug store with the location, keyalias, and passwords specified in the
config.
|
static java.lang.String |
defaultDebugKeystoreLocation()
Returns the location of the default debug keystore.
|
static CertificateInfo |
getCertificateInfo(java.lang.String storeType,
java.io.File storeFile,
java.lang.String storePassword,
java.lang.String keyPassword,
java.lang.String keyAlias)
Returns the CertificateInfo for the given signing configuration.
|
@NonNull public static java.lang.String defaultDebugKeystoreLocation() throws com.android.prefs.AndroidLocation.AndroidLocationException
com.android.prefs.AndroidLocation.AndroidLocationException
- if the location cannot be computedpublic static boolean createDebugStore(@Nullable java.lang.String storeType, @NonNull java.io.File storeFile, @NonNull java.lang.String storePassword, @NonNull java.lang.String keyPassword, @NonNull java.lang.String keyAlias, @NonNull com.android.utils.ILogger logger) throws KeytoolException
storeType
- an optional type of keystore; if null
the defaultstoreFile
- the file where the store should be createdstorePassword
- a password for the key storekeyPassword
- a password for the keykeyAlias
- the alias under which the key is stored in the storelogger
- (not used, kept for backwards compatibility)KeytoolException
@NonNull public static CertificateInfo getCertificateInfo(@Nullable java.lang.String storeType, @NonNull java.io.File storeFile, @NonNull java.lang.String storePassword, @NonNull java.lang.String keyPassword, @NonNull java.lang.String keyAlias) throws KeytoolException, java.io.FileNotFoundException
storeType
- an optional type of keystore; if null
the defaultstoreFile
- the file where the store should be createdstorePassword
- a password for the key storekeyPassword
- a password for the keykeyAlias
- the alias under which the key is stored in the storeKeytoolException
- If the password is wrongjava.io.FileNotFoundException
- If the store file cannot be found