public static final class AndroidKeysetManager.Builder extends Object
AndroidKeysetManager.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
AndroidKeysetManager |
build() |
AndroidKeysetManager.Builder |
doNotUseKeystore()
Does not use Android Keystore which might not work well in some phones.
|
AndroidKeysetManager.Builder |
withKeyTemplate(KeyTemplate val)
If the keyset is not found or valid, generates a new one using
val. |
AndroidKeysetManager.Builder |
withMasterKeyUri(String val)
Sets the master key URI.
|
AndroidKeysetManager.Builder |
withSharedPref(Context context,
String keysetName,
String prefFileName)
Reads and writes the keyset from shared preferences.
|
public AndroidKeysetManager.Builder withSharedPref(Context context, String keysetName, String prefFileName) throws IOException
IOExceptionpublic AndroidKeysetManager.Builder withMasterKeyUri(String val)
Only master keys stored in Android Keystore is supported. The URI must start with android-keystore://.
public AndroidKeysetManager.Builder withKeyTemplate(KeyTemplate val)
val.public AndroidKeysetManager.Builder doNotUseKeystore()
Warning: When Android Keystore is disabled, keys are stored in cleartext. This should be safe because they are stored in private preferences.
public AndroidKeysetManager build() throws GeneralSecurityException, IOException
KeysetHandle with the specified options.GeneralSecurityExceptionIOException