public final class SharedPrefKeysetWriter extends Object implements KeysetWriter
KeysetWriter that can write keysets to private shared preferences on Android.| Constructor and Description |
|---|
SharedPrefKeysetWriter(Context context,
String keysetName,
String prefFileName)
Creates a
KeysetReader that hex-encodes and writes keysets to the preference
name keysetName in the private shared preferences file prefFileName. |
| Modifier and Type | Method and Description |
|---|---|
void |
write(EncryptedKeyset keyset)
Tries to write an
EncryptedKeyset to some storage system. |
void |
write(Keyset keyset)
Tries to write a
Keyset to some storage system. |
public SharedPrefKeysetWriter(Context context, String keysetName, String prefFileName)
KeysetReader that hex-encodes and writes keysets to the preference
name keysetName in the private shared preferences file prefFileName.
If prefFileName is null, uses the default shared preferences file.
IOException - if cannot write the keysetIllegalArgumentException - if keysetName is nullpublic void write(Keyset keyset) throws IOException
KeysetWriterKeyset to some storage system.write in interface KeysetWriterIOExceptionpublic void write(EncryptedKeyset keyset) throws IOException
KeysetWriterEncryptedKeyset to some storage system.write in interface KeysetWriterIOException