diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Certificate.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Certificate.cs
index 99c02d586fa..c403eb82b64 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Certificate.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Certificate.cs
@@ -21,7 +21,7 @@
namespace Tizen.Security.SecureRepository
{
///
- /// The class that represents a certificate.
+ /// Represents a certificate.
///
/// 3
public class Certificate
@@ -30,14 +30,12 @@ public class Certificate
/// Loads Certificate from the given file path.
///
/// 3
- /// The path of certificate file to be loaded.
+ /// Path of certificate file to be loaded.
/// Loaded certificate class instance.
- ///
- /// The filePath should not be null
- ///
+ /// Thrown when is null.
///
- /// Invalid certificate file format. Provided file path does not exist or
- /// cannot be accessed.
+ /// Thrown when a certificate has invalid file format.
+ /// Thrown when provided file path does not exist or cannot be accessed.
///
static public Certificate Load(string filePath)
{
@@ -54,11 +52,11 @@ static public Certificate Load(string filePath)
}
///
- /// A constructor of Certificate that takes the binary and its format.
+ /// Initializes an instance of Certificate class with a binary and its data format.
///
/// 3
- /// The binary data of a certificate.
- /// The format of the binary data.
+ /// Binary data of a certificate.
+ /// Format of the binary data.
public Certificate(byte[] binary, DataFormat format)
{
this.Binary = binary;
@@ -101,8 +99,11 @@ internal IntPtr GetHandle()
}
///
- /// The binary value of a certificate.
+ /// Gets and sets binary value of a certificate.
///
+ ///
+ /// Binary value of a certificate.
+ ///
/// 3
public byte[] Binary
{
@@ -110,8 +111,11 @@ public byte[] Binary
}
///
- /// The format of the binary value.
+ /// Gets and sets format of the binary value.
///
+ ///
+ /// Format of the binary value.
+ ///
/// 3
public DataFormat Format
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/CertificateManager.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/CertificateManager.cs
index bbb465427d6..69b842664f8 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/CertificateManager.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/CertificateManager.cs
@@ -21,7 +21,7 @@
namespace Tizen.Security.SecureRepository
{
///
- /// This class provides the methods handling certificates.
+ /// Provides methods that handle certificates.
///
/// 3
public class CertificateManager : Manager
@@ -30,22 +30,22 @@ public class CertificateManager : Manager
/// Gets a certificate from the secure repository.
///
/// 3
- /// The name of a certificate to be retrieved.
- ///
- /// The password used in decrypting a certificate value. If password of
- /// policy is provided in SaveCertificate(), the same password should be
- /// provided.
- ///
- /// A certificate specified by alias.
+ ///
+ /// If password of policy is provided in SaveCertificate(),
+ /// the same password should be provided.
+ ///
+ /// Name of a certificate to be retrieved.
+ /// Password used in decrypting a certificate value.
+ /// Certificate specified by alias.
///
- /// The alias argument is null.
+ /// Thrown when argument is null.
///
///
- /// The alias argument is in an invalid format.
+ /// Thrown when argument has an invalid format.
///
///
- /// The certificate does not exist with the alias or certificate-protecting
- /// password isn't matched.
+ /// Thrown when a certificate does not exist with the or certificate-protecting
+ /// password does not match.
///
static public Certificate Get(string alias, string password)
{
@@ -69,11 +69,11 @@ static public Certificate Get(string alias, string password)
}
///
- /// Gets all aliases of certificates, which the client can access.
+ /// Gets all aliases of certificates accessible by the client.
///
/// 3
- /// All aliases of certificates, which the client can access.
- /// No alias to get.
+ /// All aliases of certificates accessible by the client.
+ /// Thrown when there's no alias to get.
static public IEnumerable GetAliases()
{
IntPtr ptr = IntPtr.Zero;
@@ -96,19 +96,15 @@ static public IEnumerable GetAliases()
/// Stores a certificate inside the secure repository based on the provided policy.
///
/// 3
- /// The name of a certificate to be stored.
- /// The certificate's binary value to be stored.
- ///
- /// The policy about how to store a certificate securely.
- ///
- ///
- /// Any of argument is null.
- ///
+ /// Name of a certificate to be stored.
+ /// Certificate's binary value to be stored.
+ /// Certificate storing policy.
+ /// Thrown when any argument is null.
///
- /// The alias argument is in the invalid format. cert argument is in the invalid format.
+ /// Thrown when or argument has an invalid format.
///
///
- /// The certificate with alias already exist.
+ /// Thrown when a certificate with given already exists.
///
static public void Save(string alias, Certificate cert, Policy policy)
{
@@ -125,30 +121,29 @@ static public void Save(string alias, Certificate cert, Policy policy)
/// Verifies a certificate chain and returns that chain.
///
/// 3
- /// The certificate to be verified.
+ ///
+ /// Trusted root certificate of the chain should exist in the system's
+ /// certificate storage.
+ ///
+ ///
+ /// Trusted root certificate of the chain in the system's certificate storage
+ /// is added to the certificate chain.
+ ///
+ /// Certificate to be verified.
///
- /// The untrusted CA certificates to be used in verifying a certificate chain.
+ /// Untrusted CA certificates to be used in verifying a certificate chain.
///
- /// A newly created certificate chain.
+ /// Newly created certificate chain.
///
- /// The certificate argument is null.
+ /// Thrown when a argument is null.
///
///
- /// Some of the certificates in arguments are invalid.
- ///
+ /// Thrown when any of the provided certificates is invalid.
///
- /// Some of the certificates in arguments are expired or not valid yet.
- /// Certificate cannot build chain.
- /// The root certificate is not in the trusted system certificate store.
+ /// Thrown when any of the provided certificates is expired or not valid yet.
+ /// Thrown when certificate cannot build a chain.
+ /// Thrown when root certificate is not in the trusted system certificate store.
///
- ///
- /// The trusted root certificate of the chain should exist in the system's
- /// certificate storage.
- ///
- ///
- /// The trusted root certificate of the chain in the system's certificate storage
- /// is added to the certificate chain.
- ///
static public IEnumerable GetCertificateChain(
Certificate certificate, IEnumerable untrustedCertificates)
{
@@ -188,33 +183,33 @@ static public IEnumerable GetCertificateChain(
/// trusted and untrusted CA certificates.
///
/// 3
- /// The certificate to be verified.
+ ///
+ /// Trusted root certificate of the chain in the system's certificate storage
+ /// is added to the certificate chain.
+ ///
+ /// Certificate to be verified.
///
- /// The untrusted CA certificates to be used in verifying a certificate chain.
+ /// Untrusted CA certificates to be used in verifying a certificate chain.
///
///
- /// The trusted CA certificates to be used in verifying a certificate chain.
+ /// Trusted CA certificates to be used in verifying a certificate chain.
///
///
- /// The flag indicating the use of the trusted root certificates in the
+ /// Flag indicating the use of the trusted root certificates in the
/// system's certificate storage.
///
- /// A newly created certificate chain.
+ /// Newly created certificate chain.
///
- /// The certificate argument is null.
+ /// Thrown when argument is null.
///
///
- /// Some of the certificates in arguments are invalid.
+ /// Thrown when any of the provided certificates is invalid.
///
///
- /// Some of the certificates in arguments are expired or not valid yet.
- /// Certificate cannot build chain.
- /// The root certificate is not in the trusted system certificate store.
+ /// Thrown when any of the provided certificates is expired or not valid yet.
+ /// Thrown when certificate cannot build a chain.
+ /// Thrown when root certificate is not in the trusted system certificate store.
///
- ///
- /// The trusted root certificate of the chain in the system's certificate storage
- /// is added to the certificate chain.
- ///
static public IEnumerable GetCertificateChain(
Certificate certificate, IEnumerable untrustedCertificates,
IEnumerable trustedCertificates,
@@ -256,21 +251,19 @@ static public IEnumerable GetCertificateChain(
}
///
- /// Perform OCSP, which checks whether the certificate is revoked or not.
+ /// [Obsolete("Please do not use! this will be deprecated")]
///
/// 3
- ///
- /// Valid certificate chain to perform the OCSP check.
- ///
- /// A status result of the OCSP check.
+ /// Valid certificate chain to perform the OCSP check.
+ /// Status result of the OCSP check.
///
- /// The certificateChain argument is null.
+ /// Thrown when argument is null.
///
///
- /// The certificateChain is not valid chain or certificate.
+ /// Thrown when is not a valid chain or certificate.
///
///
- /// Some of the certificates in chain are expired or not valid yet.
+ /// Thrown when any of the certificates in chain is expired or not valid yet.
///
[Obsolete("Please do not use! This will be deprecated with API9 and removed with API11! Please use raw OpenSSL instead!")]
static public OcspStatus CheckOcsp(IEnumerable certificateChain)
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCbcCipherParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCbcCipherParameters.cs
index 69cfb9edc58..d753b447b65 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCbcCipherParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCbcCipherParameters.cs
@@ -17,16 +17,16 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the AES algorithm with the CBC mode.
+ /// Holds parameters for the AES algorithm with the CBC mode.
///
/// 3
public class AesCbcCipherParameters : AesCipherParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of AesCbcCipherParameters class.
///
/// 3
- /// The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCbc.
+ /// CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCbc.
public AesCbcCipherParameters() : base(CipherAlgorithmType.AesCbc)
{
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCfbCipherParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCfbCipherParameters.cs
index efff9da8044..9662d592742 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCfbCipherParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCfbCipherParameters.cs
@@ -17,16 +17,16 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the AES algorithm with the CFB mode.
+ /// Holds parameters for the AES algorithm with the CFB mode.
///
/// 3
public class AesCfbCipherParameters : AesCipherParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of AesCfbCipherParameters class.
///
/// 3
- /// The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCfb.
+ /// CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCfb.
public AesCfbCipherParameters() : base(CipherAlgorithmType.AesCfb)
{
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCipherParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCipherParameters.cs
index 78c05dc7cb9..df36e4714cc 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCipherParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCipherParameters.cs
@@ -17,14 +17,17 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// An abstract class for holding parameters for the AES algorithm.
+ /// Holds parameters for the AES algorithm.
///
/// 3
public abstract class AesCipherParameters : CipherParameters
{
///
- /// An initialization vector.
+ /// Gets and sets initialization vector.
///
+ ///
+ /// Initialization vector for AES cipher.
+ ///
/// 3
public byte[] IV
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCtrCipherParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCtrCipherParameters.cs
index 222f8bfd1de..4c1335b7f8f 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCtrCipherParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCtrCipherParameters.cs
@@ -19,26 +19,28 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the AES algorithm with the counter mode.
+ /// Holds parameters for the AES algorithm with the counter mode.
///
/// 3
public class AesCtrCipherParameters : AesCipherParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of AesCtrCipherParameters class.
///
/// 3
- /// The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCtr.
+ /// CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCtr.
public AesCtrCipherParameters() : base(CipherAlgorithmType.AesCtr)
{
}
///
- /// Length of the counter block in bits.
+ /// Gets and sets the length of the counter block in bits.
///
+ ///
+ /// Length of the counter block in bits. Optional, only 128b is supported at the moment.
+ ///
/// 3
- /// Optional, only 128b is supported at the moment.
- /// The value should be positive.
+ /// Thrown when value is not positive.
public long CounterLength
{
get
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesGcmCipherParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesGcmCipherParameters.cs
index be09b020576..b7c7b249b8f 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesGcmCipherParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesGcmCipherParameters.cs
@@ -19,26 +19,31 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the AES algorithm with the GCM mode.
+ /// Holds parameters for the AES algorithm with the GCM mode.
///
/// 3
public class AesGcmCipherParameters : AesCipherParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of AesGcmCipherParameters class.
///
/// 3
- /// The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesGcm.
+ /// CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesGcm.
public AesGcmCipherParameters() : base(CipherAlgorithmType.AesGcm)
{
}
///
- /// GCM tag length in bits.
+ /// Gets and sets GCM tag length.
///
+ ///
+ /// GCM tag length in bits. One of {32, 64, 96, 104, 112, 120, 128} (optional),
+ /// if not present the length 128 is used.
+ ///
/// 3
- /// One of {32, 64, 96, 104, 112, 120, 128} (optional), if not present the length 128 is used.
- /// TagLength should be one of {32, 64, 96, 104, 112, 120, 128}.
+ ///
+ /// Thrown when TagLength is not one of {32, 64, 96, 104, 112, 120, 128}.
+ ///
public long TagLength
{
get
@@ -61,8 +66,11 @@ public long TagLength
}
///
- /// Additional authentication data (optional).
+ /// Gets and sets additional authentication data.
///
+ ///
+ /// Additional authentication data (optional).
+ ///
/// 3
public byte[] AAD
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Cipher.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Cipher.cs
index d3e38fc00f3..b95730fb950 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Cipher.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Cipher.cs
@@ -19,7 +19,7 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// This class provides the methods for encrypting and decrypting data.
+ /// Provides the methods for encrypting and decrypting data.
///
/// 3
public class Cipher
@@ -27,18 +27,21 @@ public class Cipher
private readonly CipherParameters _parameters;
///
- /// A constructor of Cipher that takes the algorithm specific parameters.
+ /// Initializes an instance of Cipher class with CipherParameters.
///
/// 3
- /// The algorithm specific parameters.
+ /// Algorithm specific parameters.
public Cipher(CipherParameters parameters)
{
_parameters = parameters;
}
///
- /// The algorithm specific parameters.
+ /// Gets algorithm specific parameters.
///
+ ///
+ /// Algorithm specific parameters.
+ ///
/// 3
public CipherParameters Parameters
{
@@ -46,34 +49,35 @@ public CipherParameters Parameters
}
///
- /// Decrypts data using the selected key and the algorithm.
+ /// Decrypts data using selected key and the algorithm.
///
/// 3
+ ///
+ /// Key type specified by keyAlias should be compatible with the algorithm
+ /// specified in Parameters.
+ ///
+ ///
+ /// If password of policy is provided in SaveKey(), the same password should be provided.
+ ///
+ ///
+ /// Some algorithms may require additional information embedded in encrypted data.
+ /// AES GCM is an example.
+ ///
/// Alias of the key to be used for decryption.
- ///
- /// The password used in decrypting a key value. If password of policy is
- /// provided in SaveKey(), the same password should be provided.
- ///
- ///
- /// Data to be decrypted (some algorithms may require additional information
- /// embedded in encrypted data.AES GCM is an example).
- ///
+ /// Password used in decrypting a key value.
+ /// Data to be decrypted.
/// Decrypted data.
///
- /// The keyAlias or cipherText is null.
+ /// Thrown when or is null.
///
///
- /// The mandatory algorithm parameter is missing or invalid.
- /// The optional algorithm parameter is invalid.
+ /// Thrown when mandatory algorithm parameter is missing or invalid.
+ /// Thrown when optional algorithm parameter is invalid.
///
///
- /// The key-protecting password isn't matched.
- /// The key does not exist with the keyAlias.
+ /// Thrown when key-protecting password does not match.
+ /// Thrown when key does not exist with given keyAlias.
///
- ///
- /// The key type specified by keyAlias should be compatible with the algorithm
- /// specified in Parameters.
- ///
public byte[] Decrypt(string keyAlias, string password, byte[] cipherText)
{
if (keyAlias == null || cipherText == null)
@@ -103,33 +107,34 @@ public byte[] Decrypt(string keyAlias, string password, byte[] cipherText)
/// Encrypts data using selected key and algorithm.
///
/// 3
- /// Alias of the key to be used for encryption.
- ///
- /// The password used in decrypting a key value. If password of policy is
- /// provided in SaveKey(), the same password should be provided.
- ///
- ///
- /// Data to be encrypted. In case of the AES algorithm, there are no restrictions on
- /// the size of data. For RSA, the size must be smaller or equal to (key_size_in
+ ///
+ /// Key type specified by the keyAlias should be compatible with the algorithm
+ /// specified in Parameters.
+ ///
+ ///
+ /// If password of policy is provided in SaveKey(), the same password should be provided.
+ ///
+ ///
+ /// In case of the AES algorithm, there are no restrictions on
+ /// the size of plaintext data. For RSA, the size must be smaller or equal to (key_size_in
/// bytes - 42). Example: For 1024 RSA key, the maximum data size is
/// 1024/8 - 42 = 86.
- ///
+ ///
+ /// Alias of the key to be used for encryption.
+ /// Password used in decrypting a key value.
+ /// Data to be encrypted.
/// Encrypted data.
///
- /// The keyAlias or plainText is null.
+ /// Thrown when or is null.
///
///
- /// The mandatory algorithm parameter is missing or invalid.
- /// The optional algorithm parameter is invalid.
+ /// Thrown when mandatory algorithm parameter is missing or invalid.
+ /// Thrown when optional algorithm parameter is invalid.
///
///
- /// The key-protecting password isn't matched.
- /// The key does not exist with the keyAlias.
+ /// Thrown when key-protecting password does not match.
+ /// Thrown when key does not exist with given .
///
- ///
- /// The key type specified by the keyAlias should be compatible with the algorithm
- /// specified in Parameters.
- ///
public byte[] Encrypt(string keyAlias, string password, byte[] plainText)
{
if (keyAlias == null || plainText == null)
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherAlgorithmType.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherAlgorithmType.cs
index 274634f2e4c..c9e5fa982db 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherAlgorithmType.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherAlgorithmType.cs
@@ -23,45 +23,55 @@ namespace Tizen.Security.SecureRepository.Crypto
public enum CipherAlgorithmType : int
{
///
- /// The AES-CTR algorithm.
+ /// AES-CTR algorithm.
+ ///
+ ///
/// Supported parameters:
- /// - ParameterName.AlgorithmType = AesCtr(mandatory),
- /// - ParameterName.IV = 16 - byte initialization vector(mandatory)
+ /// - ParameterName.AlgorithmType = AesCtr (mandatory),
+ /// - ParameterName.IV = 16 - byte initialization vector (mandatory)
/// - ParameterName.CounterLength = length of counter block in bits
- /// (optional, only 128b is supported at the moment)
- ///
+ /// (optional, only 128b is supported at the moment).
+ ///
AesCtr = 0x01,
///
- /// The AES-CBC algorithm.
- /// Supported parameters:
- /// - ParameterName.AlgorithmType = AesCbc(mandatory),
- /// - ParameterName.IV = 16-byte initialization vector(mandatory)
+ /// AES-CBC algorithm.
///
+ ///
+ /// Supported parameters:
+ /// - ParameterName.AlgorithmType = AesCbc (mandatory),
+ /// - ParameterName.IV = 16-byte initialization vector (mandatory).
+ ///
AesCbc,
///
- /// The AES-GCM algorithm.
+ /// AES-GCM algorithm.
+ ///
+ ///
/// Supported parameters:
- /// - ParameterName.AlgorithmType = AesGcm(mandatory),
- /// - ParameterName.IV = initialization vector(mandatory)
+ /// - ParameterName.AlgorithmType = AesGcm (mandatory),
+ /// - ParameterName.IV = initialization vector (mandatory)
/// - ParameterName.TagLength = GCM tag length in bits. One of
- /// {32, 64, 96, 104, 112, 120, 128} (optional, if not present the length 128 is used)
- /// - CKMC_PARAM_ED_AAD = additional authentication data(optional)
- ///
+ /// {32, 64, 96, 104, 112, 120, 128} (optional, if not present the length of 128 is used)
+ /// - CKMC_PARAM_ED_AAD = additional authentication data (optional).
+ ///
AesGcm,
///
- /// Th AES-CFB algorithm.
- /// Supported parameters:
- /// - ParameterName.AlgorithmType = AesCfb(mandatory),
- /// - ParameterName.IV = 16-byte initialization vector(mandatory)
+ /// AES-CFB algorithm.
///
+ ///
+ /// Supported parameters:
+ /// - ParameterName.AlgorithmType = AesCfb (mandatory),
+ /// - ParameterName.IV = 16-byte initialization vector (mandatory).
+ ///
AesCfb,
///
- /// The RSA-OAEP algorithm.
+ /// RSA-OAEP algorithm.
+ ///
+ ///
/// Supported parameters:
- /// - ParameterName.AlgorithmType = RsaOaep(required),
+ /// - ParameterName.AlgorithmType = RsaOaep (mandatory),
/// - ParameterName.Label = label to be associated with the message
- /// (optional, not supported at the moment)
- ///
+ /// (optional, not supported at the moment).
+ ///
RsaOaep
}
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameterName.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameterName.cs
index 27a1ea187c2..5daa82b924b 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameterName.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameterName.cs
@@ -23,12 +23,15 @@ namespace Tizen.Security.SecureRepository.Crypto
public enum CipherParameterName : int
{
///
- /// The Algorithm Type.
+ /// Algorithm Type.
///
AlgorithmType = 0x01,
///
- /// Initial Vector, 16B buffer (up to 2^64-1 bytes long in case of AES GCM).
+ /// Initial Vector.
///
+ ///
+ /// 16B buffer (up to 2^64-1 bytes long in case of AES GCM).
+ ///
IV = 101,
///
/// Integer - ctr length in bits.
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameters.cs
index 57b8aa43d0d..51bd8ae818a 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameters.cs
@@ -19,7 +19,7 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// An abstract class for holding parameters for encryption and decryption.
+ /// Holds parameters for encryption and decryption.
///
/// 3
abstract public class CipherParameters
@@ -27,8 +27,11 @@ abstract public class CipherParameters
private SafeCipherParametersHandle _handle;
///
- /// The Cipher algorithm type.
+ /// Gets cipher algorithm type.
///
+ ///
+ /// Cipher algorithm type.
+ ///
/// 3
public CipherAlgorithmType Algorithm
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/DsaSignatureParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/DsaSignatureParameters.cs
index cd7d6100dd7..55e85bd4836 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/DsaSignatureParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/DsaSignatureParameters.cs
@@ -17,13 +17,13 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the DSA signature algorithm.
+ /// Holds parameters for the DSA signature algorithm.
///
/// 3
public class DsaSignatureParameters : SignatureParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of DsaSignatureParameters class.
///
/// 3
public DsaSignatureParameters() : base(SignatureAlgorithmType.Dsa)
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/EcdsaSignatureParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/EcdsaSignatureParameters.cs
index 31e584c32e4..4e7d186ecff 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/EcdsaSignatureParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/EcdsaSignatureParameters.cs
@@ -17,13 +17,13 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the ECDSA signature algorithm.
+ /// Holds parameters for the ECDSA signature algorithm.
///
/// 3
public class EcdsaSignatureParameters : SignatureParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of EcdsaSignatureParameters class.
///
/// 3
public EcdsaSignatureParameters() : base(SignatureAlgorithmType.Ecdsa)
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/HashAlgorithm.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/HashAlgorithm.cs
index 636d1635f10..142af86145b 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/HashAlgorithm.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/HashAlgorithm.cs
@@ -23,23 +23,23 @@ namespace Tizen.Security.SecureRepository.Crypto
public enum HashAlgorithm : int
{
///
- /// The no hash algorithm.
+ /// No hash algorithm.
///
None = 0,
///
- /// The hash algorithm SHA1.
+ /// SHA1 hash algorithm.
///
Sha1,
///
- /// The hash algorithm SHA256.
+ /// SHA256 hash algorithm.
///
Sha256,
///
- /// The hash algorithm SHA384.
+ /// SHA384 hash algorithm.
///
Sha384,
///
- /// The hash algorithm SHA512.
+ /// SHA512 hash algorithm.
///
Sha512
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaOaepCipherParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaOaepCipherParameters.cs
index dd1b7357d02..c5bd8c2b5e9 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaOaepCipherParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaOaepCipherParameters.cs
@@ -17,16 +17,16 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the RSA algorithm with the OAEP mode.
+ /// Holds parameters for the RSA algorithm with the OAEP mode.
///
/// 3
public class RsaOaepCipherParameters : CipherParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of RsaOaepCipherParameters class.
///
/// 3
- /// The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.RsaOaep.
+ /// CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.RsaOaep.
public RsaOaepCipherParameters() : base(CipherAlgorithmType.RsaOaep)
{
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaSignatureParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaSignatureParameters.cs
index 7274f890307..4657503686e 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaSignatureParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaSignatureParameters.cs
@@ -17,13 +17,13 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// A class for holding parameters for the RSA signature algorithm.
+ /// Holds parameters for the RSA signature algorithm.
///
/// 3
public class RsaSignatureParameters : SignatureParameters
{
///
- /// A default constructor.
+ /// Initializes an instance of RsaSignatureParameters class.
///
/// 3
/// The RsaPadding is set to RsaPaddingAlgorithm.None.
@@ -32,8 +32,11 @@ public RsaSignatureParameters() : base(SignatureAlgorithmType.Rsa)
}
///
- /// The RSA padding algorithm.
+ /// Gets and sets RSA padding algorithm.
///
+ ///
+ /// RSA padding algorithm type.
+ ///
/// 3
public RsaPaddingAlgorithm RsaPadding
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Signature.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Signature.cs
index 65d78242ce9..8571d510691 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Signature.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Signature.cs
@@ -19,7 +19,7 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// This class provides the methods for creating and verifying a signature.
+ /// Provides the methods for creating and verifying a signature.
///
/// 3
public class Signature
@@ -27,7 +27,7 @@ public class Signature
private SignatureParameters _parameters;
///
- /// A constructor of Signature that takes the algorithm specific parameters.
+ /// Initializes an instance of Signature class with SignatureParameters.
///
/// 3
/// The algorithm specific parameters.
@@ -37,8 +37,11 @@ public Signature(SignatureParameters parameters)
}
///
- /// The algorithm specific parameters.
+ /// Gets algorithm specific parameters.
///
+ ///
+ /// Algorithm specific parameters.
+ ///
/// 3
public SignatureParameters Parameters
{
@@ -50,30 +53,30 @@ public SignatureParameters Parameters
/// the signature.
///
/// 3
- /// The name of private key.
+ ///
+ /// Key type specified by the privateKeyAlias should be compatible with the
+ /// algorithm specified in Parameters.
+ ///
+ ///
+ /// If the password of policy is provided during storing a key, the same password
+ /// should be provided.
+ ///
+ /// Name of a private key.
///
- /// The password used in decrypting a private key value.
+ /// Password used in decrypting a private key value.
///
- /// The message that is signed with a private key.
- /// A newly created signature.
+ /// Message signed with a private key.
+ /// Newly created signature.
///
- /// The privateKeyAlias or message is null.
+ /// Thrown when or is null.
///
///
- /// The privateKeyAlias is invalid format.
+ /// Thrown when has invalid format.
///
///
- /// The key-protecting password isn't matched.
- /// The key does not exist with the privateKeyAlias.
+ /// Thrown when key-protecting password does not match.
+ /// Thrown when key does not exist with given .
///
- ///
- /// The key type specified by the privateKeyAlias should be compatible with the
- /// algorithm specified in Parameters.
- ///
- ///
- /// If the password of policy is provided during storing a key, the same password
- /// should be provided.
- ///
public byte[] Sign(string privateKeyAlias, string password, byte[] message)
{
if (privateKeyAlias == null || message == null)
@@ -118,33 +121,34 @@ public byte[] Sign(string privateKeyAlias, string password, byte[] message)
/// the signature status.
///
/// 3
- /// The name of public key.
+ ///
+ /// Key type specified by publicKeyAlias should be compatible with the
+ /// algorithm specified in Parameters.
+ ///
+ ///
+ /// If password of policy is provided during storing a key, the same password
+ /// should be provided.
+ ///
+ /// Name of a public key.
///
- /// The password used in decrypting a public key value.
+ /// Password used in decrypting a public key value.
///
- /// The input on which the signature is created.
- /// The signature that is verified with public key.
+ /// Input message on which the signature is created.
+ /// Signature that is verified with public key.
///
- /// The signature status. True is returned when the signature is valid.
+ /// Signature status. True if the signature is valid.
///
///
- /// The publicKeyAlias, message or signature is null.
+ /// Thrown when ,
+ /// or is null.
///
///
- /// The publicKeyAlias is invalid format.
+ /// Thrown when has invalid format.
///
///
- /// The key-protecting password isn't matched.
- /// The key does not exist with the publicKeyAlias.
+ /// Thrown when key-protecting password does not match.
+ /// Thrown when key does not exist with given .
///
- ///
- /// The key type specified by publicKeyAlias should be compatible with the
- /// algorithm specified in Parameters.
- ///
- ///
- /// If password of policy is provided during storing a key, the same password
- /// should be provided.
- ///
public bool Verify(
string publicKeyAlias, string password, byte[] message, byte[] signature)
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureAlgorithmType.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureAlgorithmType.cs
index de83765491b..399ac37efc4 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureAlgorithmType.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureAlgorithmType.cs
@@ -23,15 +23,15 @@ namespace Tizen.Security.SecureRepository.Crypto
public enum SignatureAlgorithmType : int
{
///
- /// The RSA signature algorithm.
+ /// RSA signature algorithm.
///
Rsa = 0x01,
///
- /// The DSA signature algorithm.
+ /// DSA signature algorithm.
///
Dsa,
///
- /// The ECDSA signature algorithm.
+ /// ECDSA signature algorithm.
///
Ecdsa
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameterName.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameterName.cs
index c265ad19a4a..5e6fbbb0c6b 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameterName.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameterName.cs
@@ -23,15 +23,15 @@ namespace Tizen.Security.SecureRepository.Crypto
internal enum SignatureParameterName : int
{
///
- /// The signature algorithm type.
+ /// Signature algorithm type.
///
AlgorithmType = 0x01,
///
- /// The hash algorithm type.
+ /// Hash algorithm type.
///
HashAlgorithm,
///
- /// The RSA padding algorithm type.
+ /// RSA padding algorithm type.
///
RsaPaddingAlgorithm
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameters.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameters.cs
index a6122432922..abc3380020f 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameters.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameters.cs
@@ -20,7 +20,7 @@
namespace Tizen.Security.SecureRepository.Crypto
{
///
- /// An abstract class for holding parameters for signing and verification.
+ /// Holds parameters for signing and verification.
///
/// 3
abstract public class SignatureParameters
@@ -28,8 +28,11 @@ abstract public class SignatureParameters
private Dictionary _parameters;
///
- /// The signature algorithm type.
+ /// Gets signature algorithm type.
///
+ ///
+ /// Signature algorithm type.
+ ///
/// 3
public SignatureAlgorithmType SignatureAlgorithm
{
@@ -37,8 +40,11 @@ public SignatureAlgorithmType SignatureAlgorithm
}
///
- /// The hash algorithm used in signing anve verification.
+ /// Gets and sets hash algorithm.
///
+ ///
+ /// Hash algorithm used in signing and verification.
+ ///
/// 3
public HashAlgorithm HashAlgorithm
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataFormat.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataFormat.cs
index 6b3fac49b3c..6764ddf8e52 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataFormat.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataFormat.cs
@@ -23,17 +23,19 @@ namespace Tizen.Security.SecureRepository
public enum DataFormat : int
{
///
- /// The DER format base64 encoded data.
+ /// DER format base64 encoded data.
///
DerBase64 = 0,
///
- /// The DER encoded data.
+ /// DER encoded data.
///
Der,
///
- /// The PEM encoded data. It consists of the DER format base64 encoded
- /// with additional header and footer lines.
+ /// PEM encoded data.
///
+ ///
+ /// Consists of the DER format base64 encoded with additional header and footer lines.
+ ///
Pem
}
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataManager.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataManager.cs
index 556522b11ae..ac00e8946e0 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataManager.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataManager.cs
@@ -21,7 +21,7 @@
namespace Tizen.Security.SecureRepository
{
///
- /// This class provides the methods for storing and retrieving data.
+ /// Provides methods for storing and retrieving data.
///
/// 3
public class DataManager : Manager
@@ -30,21 +30,22 @@ public class DataManager : Manager
/// Gets data from the secure repository.
///
/// 3
- /// The name of a certificate to retrieve.
+ /// Name of a certificate to retrieve.
///
- /// The password used in decrypting a data value.
+ /// Password used in decrypting a data value.
/// If password of policy is provided in SaveData(), the same password should
/// be provided.
///
/// Data specified by alias.
///
- /// The alias argument is null.
+ /// Thrown when argument is null.
///
///
- /// The alias argument is in the invalid format.
+ /// Thrown when argument has an invalid format.
///
///
- /// Data does not exist with the alias or data-protecting password isn't matched.
+ /// Thrown when data does not exist with the
+ /// or data-protecting password does not match.
///
static public byte[] Get(string alias, string password)
{
@@ -68,11 +69,11 @@ static public byte[] Get(string alias, string password)
}
///
- /// Gets all aliases of data, which the client can access.
+ /// Gets all aliases of data accessible by the client.
///
/// 3
- /// All aliases of data, which the client can access.
- /// No alias to get.
+ /// All aliases of data accessible by the client.
+ /// Thrown when there's no alias to get.
static public IEnumerable GetAliases()
{
IntPtr ptr = IntPtr.Zero;
@@ -95,17 +96,16 @@ static public IEnumerable GetAliases()
/// Stores data inside the secure repository based on the provided policy.
///
/// 3
- /// The name of data to be stored.
- /// The binary value to be stored.
- /// The policy about how to store data securely.
- ///
- /// Any of argument is null.
- ///
+ /// Name of data to be stored.
+ /// Binary value to be stored.
+ /// Data stoting policy.
+ /// Any argument is null.
///
- /// The alias argument is in the invalid format. Data policy cannot be unextractable.
+ /// Thrown when argument has an invalid format.
+ /// Thrown when cannot be unextractable.
///
///
- /// Data with alias already exist.
+ /// Thrown when data with given already exists.
///
static public void Save(string alias, byte[] data, Policy policy)
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/EllipticCurveType.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/EllipticCurveType.cs
index d2c13b17fdc..e0f80550a98 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/EllipticCurveType.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/EllipticCurveType.cs
@@ -23,15 +23,15 @@ namespace Tizen.Security.SecureRepository
public enum EllipticCurveType : int
{
///
- /// The elliptic curve domain "secp192r1" listed in "SEC 2" recommended elliptic curve domain.
+ /// Elliptic curve domain "secp192r1" listed in "SEC 2" recommended elliptic curve domain.
///
Prime192V1 = 0,
///
- /// The "SEC 2" recommended elliptic curve domain - secp256r1.
+ /// "SEC 2" recommended elliptic curve domain - secp256r1.
///
Prime256V1,
///
- /// The NIST curve P-384(covers "secp384r1", the elliptic curve domain listed in See SEC 2.
+ /// NIST curve P-384(covers "secp384r1", the elliptic curve domain listed in See SEC 2.
///
Secp384R1
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Key.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Key.cs
index 675fc0a3d5c..6d1832eee40 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Key.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Key.cs
@@ -21,22 +21,22 @@
namespace Tizen.Security.SecureRepository
{
///
- /// The class that represents a key.
+ /// Represents a key.
///
/// 3
public class Key
{
///
- /// A constructor of Key that takes the binary, its type, and optional password
- /// of binary.
+ /// Initializes an instance of Key class with a binary, key type and a binary password.
///
/// 3
- ///
- /// The binary value of a key. This binary may be encrypted with binaryPassword.
- ///
- /// The key's type.
+ ///
+ /// The binary may be encrypted with binaryPassword.
+ ///
+ /// Binary value of a key.
+ /// Key type.
///
- /// The password used to decrypt binary when binary is encrypted.
+ /// Password used to decrypt binary when it's encrypted.
///
public Key(byte[] binary, KeyType type, string binaryPassword)
{
@@ -82,8 +82,11 @@ internal IntPtr GetHandle()
}
///
- /// The binary value of a key.
+ /// Gets and sets binary value of a key.
///
+ ///
+ /// Binary value of a key.
+ ///
/// 3
public byte[] Binary
{
@@ -91,8 +94,11 @@ public byte[] Binary
}
///
- /// The key's type.
+ /// Gets and sets key type.
///
+ ///
+ /// Key type.
+ ///
/// 3
public KeyType Type
{
@@ -100,8 +106,11 @@ public KeyType Type
}
///
- /// The password used to decrypt binary when binary is encrypted. It's optional.
+ /// Gets and sets password.
///
+ ///
+ /// Password used to decrypt binary when it's encrypted (Optional).
+ ///
/// 3
public string BinaryPassword
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyManager.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyManager.cs
index f1e3bac0cc2..c3953423702 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyManager.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyManager.cs
@@ -20,7 +20,7 @@
namespace Tizen.Security.SecureRepository
{
///
- /// This class provides the methods for storing, retrieving, and creating keys.
+ /// Provides methods for storing, retrieving, and creating keys.
///
/// 3
public class KeyManager : Manager
@@ -29,21 +29,20 @@ public class KeyManager : Manager
/// Gets a key from the secure repository.
///
/// 3
- /// The name of a key to retrieve.
+ /// Name of a key to retrieve.
///
- /// The password used in decrypting a key value.
+ /// Password used in decrypting key value.
/// If password of policy is provided in SaveKey(), the same password should
/// be provided.
///
- /// A key specified by alias.
- ///
- /// The alias argument is null.
- ///
+ /// Key specified by alias.
+ /// Thrown when argument is null.
///
- /// The alias argument is in the invalid format.
+ /// Thrown when argument has an invalid format.
///
///
- /// The key does not exist with the alias or the key-protecting password isn't matched.
+ /// Thrown when key does not exist with given
+ /// or the key-protecting password does not match.
///
static public Key Get(string alias, string password)
{
@@ -67,11 +66,11 @@ static public Key Get(string alias, string password)
}
///
- /// Gets all aliases of keys, which the client can access.
+ /// Gets all aliases of keys accessible by the client.
///
/// 3
- /// All aliases of keys, which the client can access.
- /// No alias to get.
+ /// All aliases of keys accessible by the client.
+ /// Thrown when there's no alias to get.
static public IEnumerable GetAliases()
{
IntPtr ptr = IntPtr.Zero;
@@ -94,26 +93,26 @@ static public IEnumerable GetAliases()
/// Stores a key inside the secure repository based on the provided policy.
///
/// 3
- /// The name of a key to be stored.
- /// The key's binary value to be stored.
- /// The policy about how to store a key securely.
- ///
- /// Any of argument is null.
- ///
- ///
- /// The alias argument is in the invalid format. key argument is in the invalid format.
- ///
- ///
- /// The key with alias does already exist.
- ///
///
- /// The type in key may be set to KeyType.None as an input.
- /// The type is determined inside the secure reposioty during storing keys.
+ /// Type in key may be set to KeyType. None as an input.
+ /// Type is determined inside the secure repository during storing keys.
///
///
/// If the password in policy is provided, the key is additionally encrypted with
/// the password in policy.
///
+ /// Name of a key to be stored.
+ /// Key's binary value to be stored.
+ /// Key storing policy.
+ ///
+ /// Thrown when any provided argument is null.
+ ///
+ ///
+ /// Thrown when or argument has an invalid format.
+ ///
+ ///
+ /// Thrown when key with given alias already exists.
+ ///
static public void Save(string alias, Key key, Policy policy)
{
if (alias == null || key == null || policy == null)
@@ -126,34 +125,33 @@ static public void Save(string alias, Key key, Policy policy)
}
///
- /// Creates the RSA private/public key pair and stores them inside the secure repository
+ /// Creates RSA private/public key pair and stores them inside the secure repository
/// based on each policy.
///
/// 3
- ///
- /// The size of key strength to be created. 1024, 2048, and 4096 are supported.
- ///
- /// The name of private key to be stored.
- /// The name of public key to be stored.
- ///
- /// The policy about how to store a private key securely.
- ///
- ///
- /// The policy about how to store a public key securely.
- ///
+ ///
+ /// 1024, 2048, and 4096 sizes are supported.
+ ///
+ ///
+ /// If the password in policy is provided, the key is additionally encrypted with the
+ /// password in policy.
+ ///
+ /// Size of key strength to be created.
+ /// Name of a private key to be stored.
+ /// Name of a public key to be stored.
+ /// Private key storing policy.
+ /// Public key storing policy.
///
- /// Any of argument is null.
+ /// Thrown when any provided argument is null.
///
///
- /// The size is invalid. privateKeyAlias or publicKeyAlias is invalid format.
+ /// Thrown when is invalid.
+ /// Thrown when or
+ /// has an invalid format.
///
///
- /// The key with privateKeyAlias or publicKeyAlias does already exist.
+ /// Thrown when key with or already exists.
///
- ///
- /// If the password in policy is provided, the key is additionally encrypted with the
- /// password in policy.
- ///
static public void CreateRsaKeyPair(
int size, string privateKeyAlias, string publicKeyAlias,
Policy privateKeyPolicy, Policy publicKeyPolicy)
@@ -172,35 +170,34 @@ static public void CreateRsaKeyPair(
}
///
- /// Creates the DSA private/public key pair and stores them inside the secure repository
+ /// Creates DSA private/public key pair and stores them inside the secure repository
/// based on each policy.
///
/// 3
- ///
- /// The size of key strength to be created. 1024, 2048, 3072, and 4096 are
- /// supported.
- ///
- /// The name of private key to be stored.
- /// The name of public key to be stored.
- ///
- /// The policy about how to store a private key securely.
- ///
- ///
- /// The policy about how to store a public key securely.
- ///
+ ///
+ /// 1024, 2048, 3072, and 4096 sizes are supported.
+ ///
+ ///
+ /// If the password in policy is provided, the key is additionally encrypted with
+ /// the password in policy.
+ ///
+ /// Size of key strength to be created.
+ /// Name of a private key to be stored.
+ /// Name of a public key to be stored.
+ /// Private key storing policy.
+ /// Public key storing policy.
///
- /// Any of argument is null.
+ /// Thrown when any provided argument is null.
///
///
- /// The size is invalid. privateKeyAlias or publicKeyAlias is invalid format.
+ /// Thrown when is invalid.
+ /// Thrown when or
+ /// has an invalid format.
///
///
- /// The key with privateKeyAlias or publicKeyAlias does already exist.
+ /// Thrown when key with or
+ /// already exists.
///
- ///
- /// If the password in policy is provided, the key is additionally encrypted with
- /// the password in policy.
- ///
static public void CreateDsaKeyPair(
int size, string privateKeyAlias, string publicKeyAlias,
Policy privateKeyPolicy, Policy publicKeyPolicy)
@@ -219,33 +216,31 @@ static public void CreateDsaKeyPair(
}
///
- /// Creates the ECDSA private/public key pair and stores them inside secure repository
+ /// Creates ECDSA private/public key pair and stores them inside secure repository
/// based on each policy.
///
/// 3
- /// The type of elliptic curve of ECDSA.
- /// The name of private key to be stored.
- /// The name of public key to be stored.
- ///
- /// The policy about how to store a private key securely.
- ///
- ///
- /// The policy about how to store a public key securely.
- ///
+ ///
+ /// If the password in policy is provided, the key is additionally encrypted with
+ /// the password in policy.
+ ///
+ /// Type of elliptic curve of ECDSA.
+ /// Name of private key to be stored.
+ /// Name of public key to be stored.
+ /// Private key storing policy.
+ /// Public key storing policy.
///
- /// Any of argument is null.
+ /// Thrown when any provided argument is null.
///
///
- /// The elliptic curve type is invalid. privateKeyAlias or publicKeyAlias is in the
- /// invalid format.
+ /// Thrown when is invalid.
+ /// Thrown when or
+ /// has an invalid format.
///
///
- /// The key with privateKeyAlias or publicKeyAlias does already exist.
+ /// Thrown when key with or
+ /// already exists.
///
- ///
- /// If the password in policy is provided, the key is additionally encrypted with
- /// the password in policy.
- ///
static public void CreateEcdsaKeyPair(
EllipticCurveType type, string privateKeyAlias, string publicKeyAlias,
Policy privateKeyPolicy, Policy publicKeyPolicy)
@@ -262,27 +257,29 @@ static public void CreateEcdsaKeyPair(
}
///
- /// Creates the AES key and stores it inside the secure repository based on each policy.
+ /// Creates AES key and stores it inside the secure repository based on policy.
///
/// 3
- ///
- /// The size of the key strength to be created. 128, 192 and 256 are supported.
- ///
+ ///
+ /// 128, 192 and 256 sizes are supported.
+ ///
+ ///
+ /// If the password in policy is provided, the key is additionally encrypted with
+ /// the password in policy.
+ ///
+ /// Size of the key strength to be created.
/// The name of key to be stored.
- /// The policy about how to store the key securely.
+ /// Key storing policy.
///
- /// The keyAlias or policy is null.
+ /// Thrown when or is null.
///
///
- /// The key size is invalid. keyAlias is in the invalid format.
+ /// Thrown when is invalid.
+ /// Thrown when has an invalid format.
///
///
- /// The key with privateKeyAlias or publicKeyAlias does already exist.
+ /// Thrown when key with already exists.
///
- ///
- /// If the password in policy is provided, the key is additionally encrypted with
- /// the password in policy.
- ///
static public void CreateAesKey(int size, string keyAlias, Policy policy)
{
if (size != 128 && size != 192 && size != 256)
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyType.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyType.cs
index 2458f76ed31..6cc8290b87f 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyType.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyType.cs
@@ -27,31 +27,31 @@ public enum KeyType : int
///
None = 0,
///
- /// The RSA public key.
+ /// RSA public key.
///
RsaPublic,
///
- /// The RSA private key.
+ /// RSA private key.
///
RsaPrivate,
///
- /// The ECDSA public key.
+ /// ECDSA public key.
///
EcdsaPublic,
///
- /// The ECDSA private key.
+ /// ECDSA private key.
///
EcdsaPrivate,
///
- /// The DSA public key.
+ /// DSA public key.
///
DsaPublic,
///
- /// The DSA private key.
+ /// DSA private key.
///
DsaPrivate,
///
- /// The AES key.
+ /// AES key.
///
Aes
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Manager.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Manager.cs
index 9df853b7b47..9040d6f42c1 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Manager.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Manager.cs
@@ -26,12 +26,14 @@ namespace Tizen.Security.SecureRepository
public class Manager
{
///
- /// Creates a new full alias, which is concatenation of owner ID and alias.
+ /// Creates a new full alias, which is a concatenation of owner ID and alias.
///
/// 3
- /// Data owner's ID. This should be package ID if data
- /// owner is application. If you want to access data stored by system services,
- /// use CreateFullSystemAlias() instead.
+ ///
+ /// Data owner's ID should be package ID, if data owner is an application.
+ /// If you want to access data stored by system services, use CreateFullSystemAlias() instead.
+ ///
+ /// Data owner's ID.
/// Data alias.
static public string CreateFullAlias(string ownerId, string alias)
{
@@ -39,7 +41,7 @@ static public string CreateFullAlias(string ownerId, string alias)
}
///
- /// Creates a new full alias, which is concatenation of system service's
+ /// Creates a new full alias, which is a concatenation of system service's
/// owner ID and alias.
///
/// 3
@@ -50,17 +52,21 @@ static public string CreateFullSystemAlias(string alias)
}
///
- /// Removes an entry (no matter of type) from the key manager.
+ /// Removes an entry (no matter what type) from the key manager.
///
/// 3
- /// Item alias to be removed.
- /// The alias is null.
- /// The alias is in the invalid format.
- /// The alias does not exist.
///
/// To remove item, client must remove permission to the specified item.
///
- /// The item owner can remove by default.
+ /// The item owner can remove an entry by default.
+ /// Item alias to be removed.
+ /// Thrown when is null.
+ ///
+ /// Thrown when is in the invalid format.
+ ///
+ ///
+ /// Thrown when does not exist.
+ ///
static public void RemoveAlias(string alias)
{
if (alias == null)
@@ -75,6 +81,8 @@ static public void RemoveAlias(string alias)
/// Allows another application to access client's application data.
///
/// 3
+ /// Data identified by alias should exist.
+ /// The item owner can set permissions.
/// Item alias for which access will be granted.
///
/// Package ID of the application that will gain access rights.
@@ -84,14 +92,15 @@ static public void RemoveAlias(string alias)
/// otherPackageId.
///
///
- /// The alias or otherPackageId is null.
+ /// Thrown when or is null.
///
///
- /// The alias or otherPackageId is in the invalid format.
+ /// Thrown when or
+ /// has an invalid format.
///
- /// The alias does not exist.
- /// Data identified by alias should exist.
- /// The item owner can set permissions.
+ ///
+ /// Thrown when does not exist.
+ ///
static public void SetPermission(
string alias, string otherPackageId, int permissions)
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/OcspStatus.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/OcspStatus.cs
index fb73dba3bf1..b8bbc896b59 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/OcspStatus.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/OcspStatus.cs
@@ -23,18 +23,18 @@
namespace Tizen.Security.SecureRepository
{
///
- /// Enumeration for the OCSP status.
+ /// [Obsolete("Please do not use! This will be deprecated!")]
///
/// 3
[Obsolete("Please do not use! This will be deprecated with API9 and removed with API11! Please use raw OpenSSL instead!")]
public enum OcspStatus : int
{
///
- /// The OCSP status is good.
+ /// OCSP status is good.
///
Good = 0x00,
///
- /// The certificate is revoked.
+ /// Certificate is revoked.
///
Revoked = 0x01,
///
@@ -42,27 +42,27 @@ public enum OcspStatus : int
///
Unknown = 0x02,
///
- /// The certificate does not provide the OCSP extension.
+ /// Certificate does not provide the OCSP extension.
///
Unsupported = 0x03,
///
- /// The invalid URL in the certificate OCSP extension.
+ /// Invalid URL in the certificate OCSP extension.
///
InvalidUrl = 0x04,
///
- /// The invalid response from the OCSP server.
+ /// Invalid response from the OCSP server.
///
InvalidResponse = 0x05,
///
- /// The OCSP remote server error.
+ /// OCSP remote server error.
///
RemoteError = 0x06,
///
- /// The Network connection error.
+ /// Network connection error.
///
NetworkError = 0x07,
///
- /// An Internal error.
+ /// Internal error.
///
InternalError = 0x08
}
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12.cs
index 0afb0e3f638..563e9acda34 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12.cs
@@ -22,27 +22,31 @@
namespace Tizen.Security.SecureRepository
{
///
- /// The class that represents a PKCS#12 contents.
- /// It has a private key or its certificate or all the members of a chain of trust.
+ /// Represents PKCS#12 contents.
///
/// 3
+ ///
+ /// It has a private key or its certificate or all members of a chain of trust.
+ ///
public class Pkcs12
{
private SafeCertificateListHandle _certChainHandle = null;
///
- /// Loads the Pkcs12 from the given PKCS#12 file path.
+ /// Loads Pkcs12 from the given PKCS#12 file path.
///
/// 3
- /// The path of the PKCS12 file to be loaded.
- /// The passphrase used to decrypt the PCKS12 file.
- /// If the PKCS12 file is not encrypted, passphrase can be null.
- /// The filePath is null.
+ ///
+ /// If the PKCS12 file is not encrypted, passphrase can be null.
+ ///
+ /// Path of the PKCS12 file to be loaded.
+ /// Passphrase used to decrypt the PCKS12 file.
+ /// Thrown when filePath is null.
///
- /// No file on filePath.
- /// No permission to access file.
- /// File is in the invalid PKCS12 format.
- /// File cannot be extracted with provided filePassword.
+ /// Thrown when there's no existing file on .
+ /// Thrown when there are not sufficient permissions to access the file.
+ /// Thrown when file has an invalid PKCS12 format.
+ /// Thrown when file cannot be extracted with provided .
///
static public Pkcs12 Load(string filePath, string filePassword)
{
@@ -66,7 +70,7 @@ static public Pkcs12 Load(string filePath, string filePassword)
}
///
- /// A constructor of Key that takes a private key.
+ /// Initializes an instance of Pkcs12 class with a private key.
///
/// 3
/// A private key.
@@ -78,14 +82,14 @@ public Pkcs12(Key privateKey)
}
///
- /// A constructor of Key that takes a private key, its corresponding certicate,
- /// and CA's certificate chain.
+ /// Initializes an instance of Pkcs12 class with a private key,
+ /// its corresponding certificate and CA's certificate chain.
///
/// 3
- /// A private key.
- /// A certificate corresponding the private key.
+ /// Private key.
+ /// Certificate corresponding to the private key.
///
- /// A certificate chain of CA(Certificate Authority) that issued the certificate.
+ /// Certificate chain of CA (Certificate Authority) that issued the certificate.
///
public Pkcs12(Key privateKey,
Certificate certificate,
@@ -150,8 +154,11 @@ internal IntPtr GetHandle()
}
///
- /// A private key.
+ /// Gets and sets private key.
///
+ ///
+ /// Private key.
+ ///
/// 3
public Key PrivateKey
{
@@ -159,8 +166,11 @@ public Key PrivateKey
}
///
- /// A certificate corresponding to the private key.
+ /// Gets and sets a certificate.
///
+ ///
+ /// Certificate corresponding to the private key.
+ ///
/// 3
public Certificate Certificate
{
@@ -168,8 +178,11 @@ public Certificate Certificate
}
///
- /// A certificate chain of CA(Certificate Authority) that issued the certificate.
+ /// Gets and sets a certificate chain.
///
+ ///
+ /// Certificate chain of CA (Certificate Authority) that issued the certificate.
+ ///
/// 3
public IEnumerable CaChain
{
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12Manager.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12Manager.cs
index 8775ab5f3a6..a485ec5ca5c 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12Manager.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12Manager.cs
@@ -20,7 +20,7 @@
namespace Tizen.Security.SecureRepository
{
///
- /// This class provides the methods for storing and retrieving the Pkcs12 contents.
+ /// Provides methods for storing and retrieving Pkcs12 contents.
///
/// 3
public class Pkcs12Manager : Manager
@@ -29,25 +29,28 @@ public class Pkcs12Manager : Manager
/// Gets Pkcs12 contents from the secure repository.
///
/// 3
- /// The name of data to retrieve.
- ///
- /// The password used in decrypting a private key value. If password of
- /// keyPolicy is provided in SavePkcs12(), the same password should be provided.
- ///
+ ///
+ /// If password of keyPolicy is provided in SavePkcs12(),
+ /// the same password should be provided in as keyPassword argument.
+ ///
+ ///
+ /// If password of certificatePolicy is provided in SavePkcs12(),
+ /// the same password should be provided in as cerificatePassword argument.
+ ///
+ /// Name of data to retrieve.
+ /// Password used in decrypting a private key value.
///
- /// The password used in decrypting a certificate value. If password of
- /// certificatePolicy is provided in SavePkcs12(), the same password should be
- /// provided.
+ /// Password used in decrypting a certificate value.
///
- /// A Pkcs12 data specified by alias.
- /// The alias argument is null.
+ /// Pkcs12 data specified by alias.
+ /// Thrown when argument is null.
///
- /// The alias argument is in the invalid format.
+ /// Thrown when argument has an invalid format.
///
///
- /// 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.
+ /// Thrown when Pkcs12 does not exist with given .
+ /// Thrown when optional password of key in Pkcs12 does not match.
+ /// Thrown when optional password of certificate in Pkcs12 does not match.
///
static public Pkcs12 Get(
string alias, string keyPassword, string cerificatePassword)
@@ -73,24 +76,23 @@ static public Pkcs12 Get(
}
///
- /// Stores PKCS12's contents inside key manager based on the provided policies.
- /// All items from the PKCS12 will use the same alias.
+ /// Stores PKCS12's contents inside key manager based on provided policies.
+ /// All items from PKCS12 will use the same alias.
///
/// 3
- /// The name of a data to be stored.
- /// The pkcs12 data to be stored.
- ///
- /// The policy about how to store pkcs's private key.
- ///
- ///
- /// The policy about how to store pkcs's certificate.
- ///
- /// Any of argument is null.
+ /// Name of a data to be stored.
+ /// pkcs12 data to be stored.
+ /// Pkcs' private key storing policy.
+ /// Pkcs' certificate storing policy.
+ ///
+ /// Thrown when any provided argument is null.
+ ///
///
- /// The alias argument is in the invalid format. Pkcs12 argument is in the invalid format.
+ /// Thrown when or
+ /// argument has an invalid format.
///
///
- /// Pkcs12 with alias does already exist.
+ /// Thrown when pkcs12 with given already exists.
///
static public void Save(
string alias, Pkcs12 pkcs12, Policy keyPolicy, Policy certificatePolicy)
diff --git a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Policy.cs b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Policy.cs
index ba3a8851fb1..f9df72a270f 100644
--- a/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Policy.cs
+++ b/src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Policy.cs
@@ -20,16 +20,16 @@
namespace Tizen.Security.SecureRepository
{
///
- /// A class for a policy for storing key, certificate, and binary data.
+ /// Stores policy for key, certificate, and binary data.
///
/// 3
public class Policy
{
///
- /// A default constructor of Policy with default policy.
+ /// Initializes an instance of Policy class.
///
/// 3
- /// The default value for Password is null and the default value for Extractabl is false.
+ /// Default value for Password is null and default value for Extractable is false.
public Policy()
{
Password = null;
@@ -37,10 +37,10 @@ public Policy()
}
///
- /// A constructor of Key that takes the password and the flag for extractable.
+ /// Initializes an instance of Policy class with password and extractable flag.
///
/// 3
- /// Used to encrypt data secure repository.
+ /// Used to encrypt data in secure repository.
/// If true, key may be extracted from the secure repository.
public Policy(String password, bool extractable)
{
@@ -49,9 +49,12 @@ public Policy(String password, bool extractable)
}
///
- /// Used to encrypt data secure repository. If it is not null, the data
- /// (or key, or certificate) is stored encrypted with this password inside secure repository.
+ /// Gets and sets password.
///
+ ///
+ /// Used to encrypt data in secure repository. If it is not null, the data
+ /// (or key, or certificate) is stored encrypted with this password inside secure repository.
+ ///
/// 3
public String Password
{
@@ -59,8 +62,11 @@ public String Password
}
///
- /// If true, key may be extracted from the secure repository.
+ /// Gets and sets Extractable flag.
///
+ ///
+ /// Extractable flag. If true, key may be extracted from the secure repository.
+ ///
/// 3
public bool Extractable
{