public interface PropertyStorage
PropertyStorage represents a storage which can be used to store data in the form of key-value pair. It provides protections on the stored property. PropertyStorage seals the property with a password which is managed by the PasswordManager, as well as the configured device fingerprint.
NOTE: Since the password is managed by the password manager, login is required before using the storage. Default password is supported by Ezio SDK but it is strongly recommended to use a customized password for the SecureStorage.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the storage.
|
void |
deleteAllProperties()
Delete all the properties from the storage.
|
void |
deleteProperty(byte[] key)
Delete a property with given key.
|
Set<byte[]> |
getAllKeys()
Get the set of keys for all the properties stored in the storage.
|
boolean |
hasProperty(byte[] key)
Check if an entry with the given key exist in the storage.
|
boolean |
isOpen()
Check if the storage is open.
|
void |
open()
Open the storage.
|
SecureByteArray |
readProperty(byte[] key)
Read property from the storage.
|
void |
writeProperty(byte[] key,
SecureByteArray value,
boolean wipeValue)
Store a property into the storage.
|
void open() throws PasswordManagerException, DeviceFingerprintException, IdpSecureStorageException
PasswordManagerException
- thrown when user has not logged in for SecureStorage domain.DeviceFingerprintException
- thrown when there is an failure in reading or verifying
device fingerprint.IdpSecureStorageException
- thrown when storage operation failed.boolean isOpen() throws IdpSecureStorageException
true
if storage is open.IdpSecureStorageException
- thrown when storage operation failed.Set<byte[]> getAllKeys() throws IdpSecureStorageException
IdpSecureStorageException
- thrown when storage operation failed.boolean hasProperty(byte[] key) throws IdpSecureStorageException
key
- the identifier of a property.true
if the property with given key exists.IdpSecureStorageException
- thrown when storage operation failed.void writeProperty(byte[] key, SecureByteArray value, boolean wipeValue) throws IdpSecureStorageException
key
- the identifier of a property.value
- in SecureByteArray
wipeValue
- if the value is to be wiped after calling the methodIdpSecureStorageException
- thrown when storage operation failed.SecureByteArray readProperty(byte[] key) throws IdpSecureStorageException
key
- the identifier of a property.SecureByteArray
IdpSecureStorageException
- thrown when storage operation failed.void deleteProperty(byte[] key) throws IdpSecureStorageException
key
- the identifier of a property.IdpSecureStorageException
- thrown when storage operation failed.void deleteAllProperties() throws IdpSecureStorageException
IdpSecureStorageException
- thrown when storage operation failed.void close() throws IdpSecureStorageException
IdpSecureStorageException
- thrown when storage operation failed.