public class UnencryptedProvider extends java.lang.Object implements EncryptionProvider
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PIN_CODE_ERROR_MSG |
| Constructor and Description |
|---|
UnencryptedProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
changePinCode(android.content.Context context,
java.lang.String oldPin,
java.lang.String newPin)
Changes the pin code if the old pin provided matches
|
void |
createPinCode(android.content.Context context,
java.lang.String pin)
Create a pin code from the provided input
|
Encrypter |
getEncrypter()
Returns the Encrypter for data being written to disk, which should be initialized in
EncryptionProvider.startWithPassphrase(android.content.Context, java.lang.String). |
boolean |
hasPinCode(android.content.Context context)
Returns whether the user has created a pin code.
|
void |
logAccessTime()
Logs the time of access for deciding whether to re-prompt the user for a pin after having
been away from the app for longer than the lock time.
|
boolean |
needsAuth(android.content.Context context,
PinCodeConfig codeConfig)
Returns a boolean indicating whether authentication is needed.
|
void |
startWithPassphrase(android.content.Context context,
java.lang.String pin)
This method should attempt to initialize the Encrypter with the provided pin, otherwise it
should throw a
StorageAccessException |
public static final java.lang.String PIN_CODE_ERROR_MSG
public boolean hasPinCode(android.content.Context context)
EncryptionProviderhasPinCode in interface EncryptionProvidercontext - android contextpublic void createPinCode(android.content.Context context,
java.lang.String pin)
EncryptionProvidercreatePinCode in interface EncryptionProvidercontext - android contextpin - the pin that the user enteredpublic void changePinCode(android.content.Context context,
java.lang.String oldPin,
java.lang.String newPin)
EncryptionProviderchangePinCode in interface EncryptionProvidercontext - android contextoldPin - user input for old pinnewPin - user input for the new pinpublic boolean needsAuth(android.content.Context context,
PinCodeConfig codeConfig)
EncryptionProviderneedsAuth in interface EncryptionProvidercontext - android contextcodeConfig - the pin config for the apppublic void startWithPassphrase(android.content.Context context,
java.lang.String pin)
EncryptionProviderStorageAccessExceptionstartWithPassphrase in interface EncryptionProvidercontext - android contextpin - the pin input from the userpublic void logAccessTime()
EncryptionProviderlogAccessTime in interface EncryptionProviderpublic Encrypter getEncrypter()
EncryptionProviderEncryptionProvider.startWithPassphrase(android.content.Context, java.lang.String).getEncrypter in interface EncryptionProvider