public final class SharedPrefKeysetReader extends Object implements KeysetReader
KeysetReader that can read keysets from private shared preferences on Android.| Constructor and Description |
|---|
SharedPrefKeysetReader(Context context,
String keysetName,
String prefFilename)
Creates a
KeysetReader that reads and hex-decodes keysets from the preference
name keysetName in the private shared preferences file prefFilename. |
| Modifier and Type | Method and Description |
|---|---|
Keyset |
read()
Tries to read and return a cleartext
Keyset. |
EncryptedKeyset |
readEncrypted()
Tries to read and return an
EncryptedKeyset. |
public SharedPrefKeysetReader(Context context, String keysetName, String prefFilename) throws IOException
KeysetReader that reads and hex-decodes keysets from the preference
name keysetName in the private shared preferences file prefFilename.
If prefFilename is null, uses the default shared preferences file.
IOException - if cannot read the keysetIllegalArgumentException - if keysetName is nullpublic Keyset read() throws IOException
KeysetReaderKeyset.read in interface KeysetReaderIOExceptionpublic EncryptedKeyset readEncrypted() throws IOException
KeysetReaderEncryptedKeyset.readEncrypted in interface KeysetReaderIOException