Class Pkcs12Manager
Definition
- Namespace:
- Tizen.Security.SecureRepository
- Assembly:
- Tizen.Security.SecureRepository.dll
- API Level:
- 3
This class provides the methods for storing and retrieving the Pkcs12 contents.
C#Copypublic class Pkcs12Manager : Manager
- Inheritance
Methods
Declaration
C#Copypublic static Pkcs12 Get(string alias, string keyPassword, string cerificatePassword)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The name of data to retrieve. |
System.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. |
System.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. |
API Level: 3
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
C#Copypublic static void Save(string alias, Pkcs12 pkcs12, Policy keyPolicy, Policy certificatePolicy)
Parameters
Type | Name | Description |
---|---|---|
System.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. |