Class DataManager

    Definition

    Namespace:
    Tizen.Security.SecureRepository
    Assembly:
    Tizen.Security.SecureRepository.dll

    Provides methods for storing and retrieving data.

    public class DataManager : Manager
    Inheritance
    object
    Manager
    DataManager

    Methods

    View Source

    Get(string, string)

    Gets data from the secure repository.

    Declaration
    public static byte[] Get(string alias, string password)
    Parameters
    Type Name Description
    string alias

    Name of a certificate to retrieve.

    string password

    Password used in decrypting a data value. If password of policy is provided in SaveData(), the same password should be provided.

    Returns
    Type Description
    byte[]

    Data specified by alias.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when alias argument is null.

    System.ArgumentException

    Thrown when alias argument has an invalid format.

    System.InvalidOperationException

    Thrown when data does not exist with the alias or data-protecting password does not match.

    View Source

    GetAliases()

    Gets all aliases of data accessible by the client.

    Declaration
    public static IEnumerable<string> GetAliases()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T><string>

    All aliases of data accessible by the client.

    Exceptions
    Type Condition
    System.ArgumentException

    Thrown when there's no alias to get.

    View Source

    Save(string, byte[], Policy)

    Stores data inside the secure repository based on the provided policy.

    Declaration
    public static void Save(string alias, byte[] data, Policy policy)
    Parameters
    Type Name Description
    string alias

    Name of data to be stored.

    byte[] data

    Binary value to be stored.

    Policy policy

    Data stoting policy.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Any argument is null.

    System.ArgumentException

    Thrown when alias argument has an invalid format. Thrown when policy cannot be unextractable.

    System.InvalidOperationException

    Thrown when data with given alias already exists.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX