Class DataManager
Definition
- Namespace:
- Tizen.Security.SecureRepository
- Assembly:
- Tizen.Security.SecureRepository.dll
- API Level:
- 3
This class provides the methods for storing and retrieving data.
C#Copypublic class DataManager : Manager
- Inheritance
Methods
Declaration
C#Copypublic static byte[] Get(string alias, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The name of a certificate to retrieve. |
System.String | password | The password used in decrypting a data value. If password of policy is provided in SaveData(), the same password should be provided. |
Returns
Type | Description |
---|---|
System.Byte[] | Data specified by alias. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The alias argument is null. |
System.ArgumentException | The alias argument is in the invalid format. |
InvalidOperationException | Data does not exist with the alias or data-protecting password isn't matched. |
API Level: 3
Declaration
C#Copypublic static IEnumerable<string> GetAliases()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | All aliases of data, which the client can access. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | No alias to get. |
API Level: 3
Save(String, Byte[], Policy)
Stores data inside the secure repository based on the provided policy.
Declaration
C#Copypublic static void Save(string alias, byte[] data, Policy policy)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The name of data to be stored. |
System.Byte[] | data | The binary value to be stored. |
Policy | policy | The policy about how to store data securely. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Any of argument is null. |
System.ArgumentException | The alias argument is in the invalid format. Data policy cannot be unextractable. |
InvalidOperationException | Data with alias already exist. |