Class Pkcs12Manager
Definition
- Namespace:
- Tizen.Security.SecureRepository
- Assembly:
- Tizen.Security.SecureRepository.dll
This class provides the methods for storing and retrieving the Pkcs12 contents.
public class Pkcs12Manager : Manager
- Inheritance
Methods
View SourceGet(string, string, string)
Gets Pkcs12 contents from the secure repository.
Declaration
public static Pkcs12 Get(string alias, string keyPassword, string cerificatePassword)
Parameters
Type | Name | Description |
---|---|---|
string | alias | The name of data to retrieve. |
string | keyPassword | The password used in decrypting a private key value. If password of keyPolicy is provided in SavePkcs12(), the same password should be provided. |
string | cerificatePassword | The password used in decrypting a certificate value. If password of certificatePolicy is provided in SavePkcs12(), the same password should be provided. |
Returns
Type | Description |
---|---|
Pkcs12 | A Pkcs12 data specified by alias. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The alias argument is null. |
System.ArgumentException | The alias argument is in the invalid format. |
System.InvalidOperationException | Pkcs12 does not exist with the alias. Optional password of key in Pkcs12 isn't matched. Optional password of certificate in Pkcs12 isn't matched. |
Save(string, Pkcs12, Policy, Policy)
Stores PKCS12's contents inside key manager based on the provided policies. All items from the PKCS12 will use the same alias.
Declaration
public static void Save(string alias, Pkcs12 pkcs12, Policy keyPolicy, Policy certificatePolicy)
Parameters
Type | Name | Description |
---|---|---|
string | alias | The name of a data to be stored. |
Pkcs12 | pkcs12 | The pkcs12 data to be stored. |
Policy | keyPolicy | The policy about how to store pkcs's private key. |
Policy | certificatePolicy | The policy about how to store pkcs's certificate. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Any of argument is null. |
System.ArgumentException | The alias argument is in the invalid format. Pkcs12 argument is in the invalid format. |
System.InvalidOperationException | Pkcs12 with alias does already exist. |