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(com.google.crypto.tink.proto.KeyTemplate val)
Deprecated.
This method takes a KeyTemplate proto, which is an internal implementation
detail. Please use the withKeyTemplate method that takes a
KeyTemplate POJO. |
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://.
@Deprecated public AndroidKeysetManager.Builder withKeyTemplate(com.google.crypto.tink.proto.KeyTemplate val)
KeyTemplate POJO.val.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