[Tizen.Security.SecureRepository] Enhancements of API description
authorJakub Wlostowski <j.wlostowski@samsung.com>
Fri, 20 Sep 2024 14:44:43 +0000 (16:44 +0200)
committerterry2000s <ds73.lee@samsung.com>
Mon, 21 Oct 2024 09:37:10 +0000 (18:37 +0900)
31 files changed:
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Certificate.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/CertificateManager.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCbcCipherParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCfbCipherParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCipherParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesCtrCipherParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/AesGcmCipherParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Cipher.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherAlgorithmType.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameterName.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/CipherParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/DsaSignatureParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/EcdsaSignatureParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/HashAlgorithm.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaOaepCipherParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/RsaSignatureParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/Signature.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureAlgorithmType.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameterName.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Crypto/SignatureParameters.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataFormat.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/DataManager.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/EllipticCurveType.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Key.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyManager.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/KeyType.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Manager.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/OcspStatus.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Pkcs12Manager.cs
src/Tizen.Security.SecureRepository/Tizen.Security.SecureRepository/Policy.cs

index 99c02d586fa30cc59a5fcd639273732557add218..c403eb82b64c3044468571d4762720540da3041e 100644 (file)
@@ -21,7 +21,7 @@ using static Interop;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// The class that represents a certificate.
+    /// Represents a certificate.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class Certificate
@@ -30,14 +30,12 @@ namespace Tizen.Security.SecureRepository
         /// Loads Certificate from the given file path.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="filePath">The path of certificate file to be loaded.</param>
+        /// <param name="filePath">Path of certificate file to be loaded.</param>
         /// <returns>Loaded certificate class instance.</returns>
-        /// <exception cref="ArgumentNullException">
-        /// The filePath should not be null
-        /// </exception>
+        /// <exception cref="ArgumentNullException">Thrown when <paramref name="filePath"/> is null.</exception>
         /// <exception cref="InvalidOperationException">
-        /// 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.
         /// </exception>
         static public Certificate Load(string filePath)
         {
@@ -54,11 +52,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// A constructor of Certificate that takes the binary and its format.
+        /// Initializes an instance of Certificate class with a binary and its data format.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="binary">The binary data of a certificate.</param>
-        /// <param name="format">The format of the binary data.</param>
+        /// <param name="binary">Binary data of a certificate.</param>
+        /// <param name="format">Format of the binary data.</param>
         public Certificate(byte[] binary, DataFormat format)
         {
             this.Binary = binary;
@@ -101,8 +99,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// The binary value of a certificate.
+        /// Gets and sets binary value of a certificate.
         /// </summary>
+        /// <value>
+        /// Binary value of a certificate.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public byte[] Binary
         {
@@ -110,8 +111,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// The format of the binary value.
+        /// Gets and sets format of the binary value.
         /// </summary>
+        /// <value>
+        /// Format of the binary value.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public DataFormat Format
         {
index bbb465427d609f46d2c826da69972fcc729398b7..69b842664f8ecb67fc650651531a80e959914287 100644 (file)
@@ -21,7 +21,7 @@ using static Interop;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// This class provides the methods handling certificates.
+    /// Provides methods that handle certificates.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class CertificateManager : Manager
@@ -30,22 +30,22 @@ namespace Tizen.Security.SecureRepository
         /// Gets a certificate from the secure repository.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of a certificate to be retrieved.</param>
-        /// <param name="password">
-        /// The password used in decrypting a certificate value. If password of
-        /// policy is provided in SaveCertificate(), the same password should be
-        /// provided.
-        /// </param>
-        /// <returns>A certificate specified by alias.</returns>
+        /// <remarks>
+        /// If password of policy is provided in SaveCertificate(),
+        /// the same password should be provided.
+        /// </remarks>
+        /// <param name="alias">Name of a certificate to be retrieved.</param>
+        /// <param name="password">Password used in decrypting a certificate value.</param>
+        /// <returns>Certificate specified by alias.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The alias argument is null.
+        /// Thrown when <paramref name="alias"/> argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The alias argument is in an invalid format.
+        /// Thrown when <paramref name="alias"/> argument has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// The certificate does not exist with the alias or certificate-protecting
-        /// password isn't matched.
+        /// Thrown when a certificate does not exist with the <paramref name="alias"/> or certificate-protecting
+        /// password does not match.
         /// </exception>
         static public Certificate Get(string alias, string password)
         {
@@ -69,11 +69,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// Gets all aliases of certificates, which the client can access.
+        /// Gets all aliases of certificates accessible by the client.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <returns>All aliases of certificates, which the client can access.</returns>
-        /// <exception cref="ArgumentException">No alias to get.</exception>
+        /// <returns>All aliases of certificates accessible by the client.</returns>
+        /// <exception cref="ArgumentException">Thrown when there's no alias to get.</exception>
         static public IEnumerable<string> GetAliases()
         {
             IntPtr ptr = IntPtr.Zero;
@@ -96,19 +96,15 @@ namespace Tizen.Security.SecureRepository
         /// Stores a certificate inside the secure repository based on the provided policy.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of a certificate to be stored.</param>
-        /// <param name="cert">The certificate's binary value to be stored.</param>
-        /// <param name="policy">
-        /// The policy about how to store a certificate securely.
-        /// </param>
-        /// <exception cref="ArgumentNullException">
-        /// Any of argument is null.
-        /// </exception>
+        /// <param name="alias">Name of a certificate to be stored.</param>
+        /// <param name="cert">Certificate's binary value to be stored.</param>
+        /// <param name="policy">Certificate storing policy.</param>
+        /// <exception cref="ArgumentNullException">Thrown when any argument is null.</exception>
         /// <exception cref="ArgumentException">
-        /// The alias argument is in the invalid format. cert argument is in the invalid format.
+        /// Thrown when <paramref name="alias"/> or <paramref name="cert"/> argument has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// The certificate with alias already exist.
+        /// Thrown when a certificate with given <paramref name="alias"/> already exists.
         /// </exception>
         static public void Save(string alias, Certificate cert, Policy policy)
         {
@@ -125,30 +121,29 @@ namespace Tizen.Security.SecureRepository
         /// Verifies a certificate chain and returns that chain.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="certificate">The certificate to be verified.</param>
+        /// <remarks>
+        /// Trusted root certificate of the chain should exist in the system's
+        /// certificate storage.
+        /// </remarks>
+        /// <remarks>
+        /// Trusted root certificate of the chain in the system's certificate storage
+        /// is added to the certificate chain.
+        /// </remarks>
+        /// <param name="certificate">Certificate to be verified.</param>
         /// <param name="untrustedCertificates">
-        /// The untrusted CA certificates to be used in verifying a certificate chain.
+        /// Untrusted CA certificates to be used in verifying a certificate chain.
         /// </param>
-        /// <returns>A newly created certificate chain.</returns>
+        /// <returns>Newly created certificate chain.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The certificate argument is null.
+        /// Thrown when a <paramref name="certificate"/> argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// Some of the certificates in arguments are invalid.
-        /// </exception>
+        /// Thrown when any of the provided certificates is invalid.</exception>
         /// <exception cref="InvalidOperationException">
-        /// 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.
         /// </exception>
-        /// <remarks>
-        /// The trusted root certificate of the chain should exist in the system's
-        /// certificate storage.
-        /// </remarks>
-        /// <remarks>
-        /// The trusted root certificate of the chain in the system's certificate storage
-        /// is added to the certificate chain.
-        /// </remarks>
         static public IEnumerable<Certificate> GetCertificateChain(
             Certificate certificate, IEnumerable<Certificate> untrustedCertificates)
         {
@@ -188,33 +183,33 @@ namespace Tizen.Security.SecureRepository
         /// trusted and untrusted CA certificates.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="certificate">The certificate to be verified.</param>
+        /// <remarks>
+        /// Trusted root certificate of the chain in the system's certificate storage
+        /// is added to the certificate chain.
+        /// </remarks>
+        /// <param name="certificate">Certificate to be verified.</param>
         /// <param name="untrustedCertificates">
-        /// The untrusted CA certificates to be used in verifying a certificate chain.
+        /// Untrusted CA certificates to be used in verifying a certificate chain.
         /// </param>
         /// <param name="trustedCertificates">
-        /// The trusted CA certificates to be used in verifying a certificate chain.
+        /// Trusted CA certificates to be used in verifying a certificate chain.
         /// </param>
         /// <param name="useTrustedSystemCertificates">
-        /// 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.
         /// </param>
-        /// <returns>A newly created certificate chain.</returns>
+        /// <returns>Newly created certificate chain.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The certificate argument is null.
+        /// Thrown when <paramref name="certificate"/> argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// Some of the certificates in arguments are invalid.
+        /// Thrown when any of the provided certificates is invalid.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// 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.
         /// </exception>
-        /// <remarks>
-        /// The trusted root certificate of the chain in the system's certificate storage
-        /// is added to the certificate chain.
-        /// </remarks>
         static public IEnumerable<Certificate> GetCertificateChain(
             Certificate certificate, IEnumerable<Certificate> untrustedCertificates,
             IEnumerable<Certificate> trustedCertificates,
@@ -256,21 +251,19 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// Perform OCSP, which checks whether the certificate is revoked or not.
+        /// [Obsolete("Please do not use! this will be deprecated")]
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="certificateChain">
-        /// Valid certificate chain to perform the OCSP check.
-        /// </param>
-        /// <returns>A status result of the OCSP check.</returns>
+        /// <param name="certificateChain">Valid certificate chain to perform the OCSP check.</param>
+        /// <returns>Status result of the OCSP check.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The certificateChain argument is null.
+        /// Thrown when <paramref name="certificateChain"/> argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The certificateChain is not valid chain or certificate.
+        /// Thrown when <paramref name="certificateChain"/> is not a valid chain or certificate.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// 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.
         /// </exception>
         [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<Certificate> certificateChain)
index 69cfb9edc5897191a768626f1b9d65df9e214d73..d753b447b65a694432945720221970944bdc5069 100644 (file)
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the AES algorithm with the CBC mode.
+    /// Holds parameters for the AES algorithm with the CBC mode.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class AesCbcCipherParameters : AesCipherParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of AesCbcCipherParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCbc.</remarks>
+        /// <remarks>CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCbc.</remarks>
         public AesCbcCipherParameters() : base(CipherAlgorithmType.AesCbc)
         {
         }
index efff9da8044e7a76b5a184ced0a0ff5111dff2e8..9662d592742f6c5720995870821aaa485850daea 100644 (file)
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the AES algorithm with the CFB mode.
+    /// Holds parameters for the AES algorithm with the CFB mode.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class AesCfbCipherParameters : AesCipherParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of AesCfbCipherParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCfb.</remarks>
+        /// <remarks>CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCfb.</remarks>
         public AesCfbCipherParameters() : base(CipherAlgorithmType.AesCfb)
         {
         }
index 78c05dc7cb9ff792eef66062753b1ff56e9ebc1d..df36e4714cce734b454fa9b47c8a224ec2ec782c 100644 (file)
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// An abstract class for holding parameters for the AES algorithm.
+    /// Holds parameters for the AES algorithm.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public abstract class AesCipherParameters : CipherParameters
     {
         /// <summary>
-        /// An initialization vector.
+        /// Gets and sets initialization vector.
         /// </summary>
+        /// <value>
+        /// Initialization vector for AES cipher.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public byte[] IV
         {
index 222f8bfd1de26386bdc8c33976ca7393e173b1c2..4c1335b7f8f1ff5a3910d73cfc27b2d12284c786 100644 (file)
@@ -19,26 +19,28 @@ using System;
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the AES algorithm with the counter mode.
+    /// Holds parameters for the AES algorithm with the counter mode.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class AesCtrCipherParameters : AesCipherParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of AesCtrCipherParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCtr.</remarks>
+        /// <remarks>CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesCtr.</remarks>
         public AesCtrCipherParameters() : base(CipherAlgorithmType.AesCtr)
         {
         }
 
         /// <summary>
-        /// Length of the counter block in bits.
+        /// Gets and sets the length of the counter block in bits.
         /// </summary>
+        /// <value>
+        /// Length of the counter block in bits. Optional, only 128b is supported at the moment.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>Optional, only 128b is supported at the moment.</remarks>
-        /// <exception cref="ArgumentOutOfRangeException">The value should be positive.</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Thrown when value is not positive.</exception>
         public long CounterLength
         {
             get
index be09b0205764b5d6e885b1c0d7f0b948f54ecab9..b7c7b249b8fb8dc79761780fdf180208209d9082 100644 (file)
@@ -19,26 +19,31 @@ using System;
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the AES algorithm with the GCM mode.
+    /// Holds parameters for the AES algorithm with the GCM mode.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class AesGcmCipherParameters : AesCipherParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of AesGcmCipherParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesGcm.</remarks>
+        /// <remarks>CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.AesGcm.</remarks>
         public AesGcmCipherParameters() : base(CipherAlgorithmType.AesGcm)
         {
         }
 
         /// <summary>
-        /// GCM tag length in bits.
+        /// Gets and sets GCM tag length.
         /// </summary>
+        /// <value>
+        /// GCM tag length in bits. One of {32, 64, 96, 104, 112, 120, 128} (optional),
+        /// if not present the length 128 is used.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>One of {32, 64, 96, 104, 112, 120, 128} (optional), if not present the length 128 is used.</remarks>
-        /// <exception cref="ArgumentOutOfRangeException">TagLength should be one of {32, 64, 96, 104, 112, 120, 128}.</exception>
+        /// <exception cref="ArgumentOutOfRangeException">
+        /// Thrown when TagLength is not one of {32, 64, 96, 104, 112, 120, 128}.
+        /// </exception>
         public long TagLength
         {
             get
@@ -61,8 +66,11 @@ namespace Tizen.Security.SecureRepository.Crypto
         }
 
         /// <summary>
-        /// Additional authentication data (optional).
+        /// Gets and sets additional authentication data.
         /// </summary>
+        /// <value>
+        /// Additional authentication data (optional).
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public byte[] AAD
         {
index d3e38fc00f31fedaa3e8a0c7b9b7acb094c3f278..b95730fb950bb113f835256f29ac956bb44b68a2 100644 (file)
@@ -19,7 +19,7 @@ using System;
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// This class provides the methods for encrypting and decrypting data.
+    /// Provides the methods for encrypting and decrypting data.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class Cipher
@@ -27,18 +27,21 @@ namespace Tizen.Security.SecureRepository.Crypto
         private readonly CipherParameters _parameters;
 
         /// <summary>
-        /// A constructor of Cipher that takes the algorithm specific parameters.
+        /// Initializes an instance of Cipher class with CipherParameters.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="parameters">The algorithm specific parameters.</param>
+        /// <param name="parameters">Algorithm specific parameters.</param>
         public Cipher(CipherParameters parameters)
         {
             _parameters = parameters;
         }
 
         /// <summary>
-        /// The algorithm specific parameters.
+        /// Gets algorithm specific parameters.
         /// </summary>
+        /// <value>
+        /// Algorithm specific parameters.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public CipherParameters Parameters
         {
@@ -46,34 +49,35 @@ namespace Tizen.Security.SecureRepository.Crypto
         }
 
         /// <summary>
-        /// Decrypts data using the selected key and the algorithm.
+        /// Decrypts data using selected key and the algorithm.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <remarks>
+        /// Key type specified by keyAlias should be compatible with the algorithm
+        /// specified in Parameters.
+        /// </remarks>
+        /// <remarks>
+        /// If password of policy is provided in SaveKey(), the same password should be provided.
+        /// </remarks>
+        /// <remarks>
+        /// Some algorithms may require additional information embedded in encrypted data.
+        /// AES GCM is an example.
+        /// </remarks>
         /// <param name="keyAlias">Alias of the key to be used for decryption.</param>
-        /// <param name="password">
-        /// The password used in decrypting a key value. If password of policy is
-        /// provided in SaveKey(), the same password should be provided.
-        /// </param>
-        /// <param name="cipherText">
-        /// Data to be decrypted (some algorithms may require additional information
-        /// embedded in encrypted data.AES GCM is an example).
-        /// </param>
+        /// <param name="password">Password used in decrypting a key value.</param>
+        /// <param name="cipherText">Data to be decrypted.</param>
         /// <returns>Decrypted data.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The keyAlias or cipherText is null.
+        /// Thrown when <paramref name="keyAlias"/> or <paramref name="cipherText"/> is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// 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.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// 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.
         /// </exception>
-        /// <remarks>
-        /// The key type specified by keyAlias should be compatible with the algorithm
-        /// specified in Parameters.
-        /// </remarks>
         public byte[] Decrypt(string keyAlias, string password, byte[] cipherText)
         {
             if (keyAlias == null || cipherText == null)
@@ -103,33 +107,34 @@ namespace Tizen.Security.SecureRepository.Crypto
         /// Encrypts data using selected key and algorithm.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="keyAlias">Alias of the key to be used for encryption.</param>
-        /// <param name="password">
-        /// The password used in decrypting a key value. If password of policy is
-        /// provided in SaveKey(), the same password should be provided.
-        /// </param>
-        /// <param name="plainText">
-        /// 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
+        /// <remarks>
+        /// Key type specified by the keyAlias should be compatible with the algorithm
+        /// specified in Parameters.
+        /// </remarks>
+        /// <remarks>
+        /// If password of policy is provided in SaveKey(), the same password should be provided.
+        /// </remarks>
+        /// <remarks>
+        /// 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.
-        /// </param>
+        /// </remarks>
+        /// <param name="keyAlias">Alias of the key to be used for encryption.</param>
+        /// <param name="password">Password used in decrypting a key value.</param>
+        /// <param name="plainText">Data to be encrypted.</param>
         /// <returns>Encrypted data.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The keyAlias or plainText is null.
+        /// Thrown when <paramref name="keyAlias"/> or <paramref name="plainText"/> is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// 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.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// 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 <paramref name="keyAlias"/>.
         /// </exception>
-        /// <remarks>
-        /// The key type specified by the keyAlias should be compatible with the algorithm
-        /// specified in Parameters.
-        /// </remarks>
         public byte[] Encrypt(string keyAlias, string password, byte[] plainText)
         {
             if (keyAlias == null || plainText == null)
index 274634f2e4c7a68887b03d983b7ef467e1827e52..c9e5fa982db87fc0dffebad74a55f4f0d3e22b7f 100644 (file)
@@ -23,45 +23,55 @@ namespace Tizen.Security.SecureRepository.Crypto
     public enum CipherAlgorithmType : int
     {
         /// <summary>
-        /// The AES-CTR algorithm.
+        /// AES-CTR algorithm.
+        /// </summary>
+        /// <remarks>
         /// 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)
-        /// </summary>
+        ///   (optional, only 128b is supported at the moment).
+        /// </remarks>
         AesCtr = 0x01,
         /// <summary>
-        /// The AES-CBC algorithm.
-        /// Supported parameters:
-        /// - ParameterName.AlgorithmType = AesCbc(mandatory),
-        /// - ParameterName.IV = 16-byte initialization vector(mandatory)
+        /// AES-CBC algorithm.
         /// </summary>
+        /// <remarks>
+        /// Supported parameters:
+        /// - ParameterName.AlgorithmType = AesCbc (mandatory),
+        /// - ParameterName.IV = 16-byte initialization vector (mandatory).
+        /// </remarks>
         AesCbc,
         /// <summary>
-        /// The AES-GCM algorithm.
+        /// AES-GCM algorithm.
+        /// </summary>
+        /// <remarks>
         /// 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)
-        /// </summary>
+        ///   {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).
+        /// </remarks>
         AesGcm,
         /// <summary>
-        /// Th AES-CFB algorithm.
-        /// Supported parameters:
-        /// - ParameterName.AlgorithmType = AesCfb(mandatory),
-        /// - ParameterName.IV = 16-byte initialization vector(mandatory)
+        /// AES-CFB algorithm.
         /// </summary>
+        /// <remarks>
+        /// Supported parameters:
+        /// - ParameterName.AlgorithmType = AesCfb (mandatory),
+        /// - ParameterName.IV = 16-byte initialization vector (mandatory).
+        /// </remarks>
         AesCfb,
         /// <summary>
-        /// The RSA-OAEP algorithm.
+        /// RSA-OAEP algorithm.
+        /// </summary>
+        /// <remarks>
         /// 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)
-        /// </summary>
+        ///   (optional, not supported at the moment).
+        /// </remarks>
         RsaOaep
     }
 }
index 27a1ea187c2103f17985794d98a9d8885929414d..5daa82b924bd9f59ae22f023102cc4ef1a453967 100644 (file)
@@ -23,12 +23,15 @@ namespace Tizen.Security.SecureRepository.Crypto
     public enum CipherParameterName : int
     {
         /// <summary>
-        /// The Algorithm Type.
+        /// Algorithm Type.
         /// </summary>
         AlgorithmType = 0x01,
         /// <summary>
-        /// Initial Vector,  16B buffer (up to 2^64-1 bytes long in case of AES GCM).
+        /// Initial Vector.
         /// </summary>
+        /// <remarks>
+        /// 16B buffer (up to 2^64-1 bytes long in case of AES GCM).
+        /// </remarks>
         IV = 101,
         /// <summary>
         /// Integer - ctr length in bits.
index 57b8aa43d0d231c494bab3267267a8b03f733205..51bd8ae818abf6eb6175f2bd1ef89d09a96b80a8 100644 (file)
@@ -19,7 +19,7 @@ using System;
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// An abstract class for holding parameters for encryption and decryption.
+    /// Holds parameters for encryption and decryption.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     abstract public class CipherParameters
@@ -27,8 +27,11 @@ namespace Tizen.Security.SecureRepository.Crypto
         private SafeCipherParametersHandle _handle;
 
         /// <summary>
-        /// The Cipher algorithm type.
+        /// Gets cipher algorithm type.
         /// </summary>
+        /// <value>
+        /// Cipher algorithm type.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public CipherAlgorithmType Algorithm
         {
index cd7d6100dd709ca7ab900c47456210ae5ec3fccd..55e85bd4836381cba2eb6c9bdd6841c2135be37f 100644 (file)
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the DSA signature algorithm.
+    /// Holds parameters for the DSA signature algorithm.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class DsaSignatureParameters : SignatureParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of DsaSignatureParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public DsaSignatureParameters() : base(SignatureAlgorithmType.Dsa)
index 31e584c32e4f25548786124f28bc4d5bc16620db..4e7d186ecff253ae845fbf9d9872ded6d0760559 100644 (file)
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the ECDSA signature algorithm.
+    /// Holds parameters for the ECDSA signature algorithm.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class EcdsaSignatureParameters : SignatureParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of EcdsaSignatureParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public EcdsaSignatureParameters() : base(SignatureAlgorithmType.Ecdsa)
index 636d1635f10e4f6423e054b1cf09b7576f44c49c..142af86145b87709330011246364a46d6a82ff6b 100644 (file)
@@ -23,23 +23,23 @@ namespace Tizen.Security.SecureRepository.Crypto
     public enum HashAlgorithm : int
     {
         /// <summary>
-        /// The no hash algorithm.
+        /// No hash algorithm.
         /// </summary>
         None = 0,
         /// <summary>
-        /// The hash algorithm SHA1.
+        /// SHA1 hash algorithm.
         /// </summary>
         Sha1,
         /// <summary>
-        /// The hash algorithm SHA256.
+        /// SHA256 hash algorithm.
         /// </summary>
         Sha256,
         /// <summary>
-        /// The hash algorithm SHA384.
+        /// SHA384 hash algorithm.
         /// </summary>
         Sha384,
         /// <summary>
-        /// The hash algorithm SHA512.
+        /// SHA512 hash algorithm.
         /// </summary>
         Sha512
     }
index dd1b7357d024cd87033e0815000f487bd25ed709..c5bd8c2b5e9f1250d375affa8eac0ad35fbd9731 100644 (file)
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the RSA algorithm with the OAEP mode.
+    /// Holds parameters for the RSA algorithm with the OAEP mode.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class RsaOaepCipherParameters : CipherParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of RsaOaepCipherParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>The CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.RsaOaep.</remarks>
+        /// <remarks>CipherAlgorithmType in CipherParameters is set to CipherAlgorithmType.RsaOaep.</remarks>
         public RsaOaepCipherParameters() : base(CipherAlgorithmType.RsaOaep)
         {
         }
index 7274f89030705b95f55bc671dd963263c1922c3e..4657503686e6e52b20e886dad05d5cb374fdf3f2 100644 (file)
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// A class for holding parameters for the RSA signature algorithm.
+    /// Holds parameters for the RSA signature algorithm.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class RsaSignatureParameters : SignatureParameters
     {
         /// <summary>
-        /// A default constructor.
+        /// Initializes an instance of RsaSignatureParameters class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <remarks>The RsaPadding is set to RsaPaddingAlgorithm.None.</remarks>
@@ -32,8 +32,11 @@ namespace Tizen.Security.SecureRepository.Crypto
         }
 
         /// <summary>
-        /// The RSA padding algorithm.
+        /// Gets and sets RSA padding algorithm.
         /// </summary>
+        /// <value>
+        /// RSA padding algorithm type.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public RsaPaddingAlgorithm RsaPadding
         {
index 65d78242ce927c1a9a4f6a3dfcf75c204d7e7ac0..8571d5106917ef98d4efb540a379267e457f6cc9 100644 (file)
@@ -19,7 +19,7 @@ using System;
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// This class provides the methods for creating and verifying a signature.
+    /// Provides the methods for creating and verifying a signature.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class Signature
@@ -27,7 +27,7 @@ namespace Tizen.Security.SecureRepository.Crypto
         private SignatureParameters _parameters;
 
         /// <summary>
-        /// A constructor of Signature that takes the algorithm specific parameters.
+        /// Initializes an instance of Signature class with SignatureParameters.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <param name="parameters">The algorithm specific parameters.</param>
@@ -37,8 +37,11 @@ namespace Tizen.Security.SecureRepository.Crypto
         }
 
         /// <summary>
-        /// The algorithm specific parameters.
+        /// Gets algorithm specific parameters.
         /// </summary>
+        /// <value>
+        /// Algorithm specific parameters.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public SignatureParameters Parameters
         {
@@ -50,30 +53,30 @@ namespace Tizen.Security.SecureRepository.Crypto
         /// the signature.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="privateKeyAlias">The name of private key.</param>
+        /// <remarks>
+        /// Key type specified by the privateKeyAlias should be compatible with the
+        /// algorithm specified in Parameters.
+        /// </remarks>
+        /// <remarks>
+        /// If the password of policy is provided during storing a key, the same password
+        /// should be provided.
+        /// </remarks>
+        /// <param name="privateKeyAlias">Name of a private key.</param>
         /// <param name="password">
-        /// The password used in decrypting a private key value.
+        /// Password used in decrypting a private key value.
         /// </param>
-        /// <param name="message">The message that is signed with a private key.</param>
-        /// <returns>A newly created signature.</returns>
+        /// <param name="message">Message signed with a private key.</param>
+        /// <returns>Newly created signature.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The privateKeyAlias or message is null.
+        /// Thrown when <paramref name="privateKeyAlias"/> or <paramref name="message"/> is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The privateKeyAlias is invalid format.
+        /// Thrown when <paramref name="privateKeyAlias"/> has invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// 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 <paramref name="privateKeyAlias"/>.
         /// </exception>
-        /// <remarks>
-        /// The key type specified by the privateKeyAlias should be compatible with the
-        /// algorithm specified in Parameters.
-        /// </remarks>
-        /// <remarks>
-        /// If the password of policy is provided during storing a key, the same password
-        /// should be provided.
-        /// </remarks>
         public byte[] Sign(string privateKeyAlias, string password, byte[] message)
         {
             if (privateKeyAlias == null || message == null)
@@ -118,33 +121,34 @@ namespace Tizen.Security.SecureRepository.Crypto
         /// the signature status.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="publicKeyAlias">The name of public key.</param>
+        /// <remarks>
+        /// Key type specified by publicKeyAlias should be compatible with the
+        /// algorithm specified in Parameters.
+        /// </remarks>
+        /// <remarks>
+        /// If password of policy is provided during storing a key, the same password
+        /// should be provided.
+        /// </remarks>
+        /// <param name="publicKeyAlias">Name of a public key.</param>
         /// <param name="password">
-        /// The password used in decrypting a public key value.
+        /// Password used in decrypting a public key value.
         /// </param>
-        /// <param name="message">The input on which the signature is created.</param>
-        /// <param name="signature">The signature that is verified with public key.</param>
+        /// <param name="message">Input message on which the signature is created.</param>
+        /// <param name="signature">Signature that is verified with public key.</param>
         /// <returns>
-        /// The signature status. True is returned when the signature is valid.
+        /// Signature status. True if the signature is valid.
         /// </returns>
         /// <exception cref="ArgumentNullException">
-        /// The publicKeyAlias, message or signature is null.
+        /// Thrown when <paramref name="publicKeyAlias"/>, <paramref name="message"/>
+        /// or <paramref name="signature"/> is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The publicKeyAlias is invalid format.
+        /// Thrown when <paramref name="publicKeyAlias"/> has invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// 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 <paramref name="publicKeyAlias"/>.
         /// </exception>
-        /// <remarks>
-        /// The key type specified by publicKeyAlias should be compatible with the
-        /// algorithm specified in Parameters.
-        /// </remarks>
-        /// <remarks>
-        /// If password of policy is provided during storing a key, the same password
-        /// should be provided.
-        /// </remarks>
         public bool Verify(
             string publicKeyAlias, string password, byte[] message, byte[] signature)
         {
index de83765491b26ceca71a0767248884e2ef8120d1..399ac37efc4016f9d0186ef99242c49b2a5e6010 100644 (file)
@@ -23,15 +23,15 @@ namespace Tizen.Security.SecureRepository.Crypto
     public enum SignatureAlgorithmType : int
     {
         /// <summary>
-        /// The RSA signature algorithm.
+        /// RSA signature algorithm.
         /// </summary>
         Rsa = 0x01,
         /// <summary>
-        /// The DSA signature algorithm.
+        /// DSA signature algorithm.
         /// </summary>
         Dsa,
         /// <summary>
-        /// The ECDSA signature algorithm.
+        /// ECDSA signature algorithm.
         /// </summary>
         Ecdsa
     }
index c265ad19a4af6bea30648a04e8bca362eaede025..5e6fbbb0c6b9d2c31aae93d28e6a2e33ad71744e 100644 (file)
@@ -23,15 +23,15 @@ namespace Tizen.Security.SecureRepository.Crypto
     internal enum SignatureParameterName : int
     {
         /// <summary>
-        /// The signature algorithm type.
+        /// Signature algorithm type.
         /// </summary>
         AlgorithmType = 0x01,
         /// <summary>
-        /// The hash algorithm type.
+        /// Hash algorithm type.
         /// </summary>
         HashAlgorithm,
         /// <summary>
-        /// The RSA padding algorithm type.
+        /// RSA padding algorithm type.
         /// </summary>
         RsaPaddingAlgorithm
     }
index a6122432922baf1624c1b62b61b0cda2d1086bde..abc3380020f2314700e9528616d893aa86cc8b32 100644 (file)
@@ -20,7 +20,7 @@ using System.Collections.Generic;
 namespace Tizen.Security.SecureRepository.Crypto
 {
     /// <summary>
-    /// An abstract class for holding parameters for signing and verification.
+    /// Holds parameters for signing and verification.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     abstract public class SignatureParameters
@@ -28,8 +28,11 @@ namespace Tizen.Security.SecureRepository.Crypto
         private Dictionary<SignatureParameterName, int> _parameters;
 
         /// <summary>
-        /// The signature algorithm type.
+        /// Gets signature algorithm type.
         /// </summary>
+        /// <value>
+        /// Signature algorithm type.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public SignatureAlgorithmType SignatureAlgorithm
         {
@@ -37,8 +40,11 @@ namespace Tizen.Security.SecureRepository.Crypto
         }
 
         /// <summary>
-        /// The hash algorithm used in signing anve verification.
+        /// Gets and sets hash algorithm.
         /// </summary>
+        /// <value>
+        /// Hash algorithm used in signing and verification.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public HashAlgorithm HashAlgorithm
         {
index 6b3fac49b3c6dcd9dddf8acbb9a71548af7a189b..6764ddf8e52ec3a98800206dcf1af4e1f389b78c 100644 (file)
@@ -23,17 +23,19 @@ namespace Tizen.Security.SecureRepository
     public enum DataFormat : int
     {
         /// <summary>
-        /// The DER format base64 encoded data.
+        /// DER format base64 encoded data.
         /// </summary>
         DerBase64 = 0,
         /// <summary>
-        /// The DER encoded data.
+        /// DER encoded data.
         /// </summary>
         Der,
         /// <summary>
-        /// The PEM encoded data. It consists of the DER format base64 encoded
-        /// with additional header and footer lines.
+        /// PEM encoded data.
         /// </summary>
+        /// <remarks>
+        /// Consists of the DER format base64 encoded with additional header and footer lines.
+        /// </remarks>
         Pem
     }
 }
index 556522b11ae4aac86bf2cc3ca4f237864fd99637..ac00e8946e05489a90fcbba2a4870ba802f7200a 100644 (file)
@@ -21,7 +21,7 @@ using static Interop;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// This class provides the methods for storing and retrieving data.
+    /// Provides methods for storing and retrieving data.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class DataManager : Manager
@@ -30,21 +30,22 @@ namespace Tizen.Security.SecureRepository
         /// Gets data from the secure repository.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of a certificate to retrieve.</param>
+        /// <param name="alias">Name of a certificate to retrieve.</param>
         /// <param name="password">
-        /// 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.
         /// </param>
         /// <returns>Data specified by alias.</returns>
         /// <exception cref="ArgumentNullException">
-        /// The alias argument is null.
+        /// Thrown when <paramref name="alias"/> argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The alias argument is in the invalid format.
+        /// Thrown when <paramref name="alias"/> argument has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// Data does not exist with the alias or data-protecting password isn't matched.
+        /// Thrown when data does not exist with the <paramref name="alias"/>
+        /// or data-protecting password does not match.
         /// </exception>
         static public byte[] Get(string alias, string password)
         {
@@ -68,11 +69,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// Gets all aliases of data, which the client can access.
+        /// Gets all aliases of data accessible by the client.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <returns>All aliases of data, which the client can access.</returns>
-        /// <exception cref="ArgumentException">No alias to get.</exception>
+        /// <returns>All aliases of data accessible by the client.</returns>
+        /// <exception cref="ArgumentException">Thrown when there's no alias to get.</exception>
         static public IEnumerable<string> GetAliases()
         {
             IntPtr ptr = IntPtr.Zero;
@@ -95,17 +96,16 @@ namespace Tizen.Security.SecureRepository
         /// Stores data inside the secure repository based on the provided policy.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of data to be stored.</param>
-        /// <param name="data">The binary value to be stored.</param>
-        /// <param name="policy">The policy about how to store data securely.</param>
-        /// <exception cref="ArgumentNullException">
-        /// Any of argument is null.
-        /// </exception>
+        /// <param name="alias">Name of data to be stored.</param>
+        /// <param name="data">Binary value to be stored.</param>
+        /// <param name="policy">Data stoting policy.</param>
+        /// <exception cref="ArgumentNullException">Any argument is null.</exception>
         /// <exception cref="ArgumentException">
-        /// The alias argument is in the invalid format. Data policy cannot be unextractable.
+        /// Thrown when <paramref name="alias"/> argument has an invalid format.
+        /// Thrown when <paramref name="policy"/> cannot be unextractable.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// Data with alias already exist.
+        /// Thrown when data with given <paramref name="alias"/> already exists.
         /// </exception>
         static public void Save(string alias, byte[] data, Policy policy)
         {
index d2c13b17fdca335a8ebccd2323125b8e88dd396c..e0f80550a9874f8c1454c39d35be65d43e6e10f2 100644 (file)
@@ -23,15 +23,15 @@ namespace Tizen.Security.SecureRepository
     public enum EllipticCurveType : int
     {
         /// <summary>
-        /// 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.
         /// </summary>
         Prime192V1 = 0,
         /// <summary>
-        /// The "SEC 2" recommended elliptic curve domain - secp256r1.
+        /// "SEC 2" recommended elliptic curve domain - secp256r1.
         /// </summary>
         Prime256V1,
         /// <summary>
-        /// 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.
         /// </summary>
         Secp384R1
     }
index 675fc0a3d5cd455fc5b70ee4b4b63ca4bdaa5c27..6d1832eee405df5c0da0b872d3c02089b135864f 100644 (file)
@@ -21,22 +21,22 @@ using static Interop;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// The class that represents a key.
+    /// Represents a key.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class Key
     {
         /// <summary>
-        /// 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.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="binary">
-        /// The binary value of a key. This binary may be encrypted with binaryPassword.
-        /// </param>
-        /// <param name="type">The key's type.</param>
+        /// <remarks>
+        /// The binary may be encrypted with binaryPassword.
+        /// </remarks>
+        /// <param name="binary">Binary value of a key.</param>
+        /// <param name="type">Key type.</param>
         /// <param name="binaryPassword">
-        /// The password used to decrypt binary when binary is encrypted.
+        /// Password used to decrypt binary when it's encrypted.
         /// </param>
         public Key(byte[] binary, KeyType type, string binaryPassword)
         {
@@ -82,8 +82,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// The binary value of a key.
+        /// Gets and sets binary value of a key.
         /// </summary>
+        /// <value>
+        /// Binary value of a key.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public byte[] Binary
         {
@@ -91,8 +94,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// The key's type.
+        /// Gets and sets key type.
         /// </summary>
+        /// <value>
+        /// Key type.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public KeyType Type
         {
@@ -100,8 +106,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// The password used to decrypt binary when binary is encrypted. It's optional.
+        /// Gets and sets password.
         /// </summary>
+        /// <value>
+        /// Password used to decrypt binary when it's encrypted (Optional).
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public string BinaryPassword
         {
index f1e3bac0cc2f9835a666bab222f0ab3d922bd7fb..c3953423702b51534836a38a095bc86da88ee02d 100644 (file)
@@ -20,7 +20,7 @@ using System.Collections.Generic;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// This class provides the methods for storing, retrieving, and creating keys.
+    /// Provides methods for storing, retrieving, and creating keys.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class KeyManager : Manager
@@ -29,21 +29,20 @@ namespace Tizen.Security.SecureRepository
         /// Gets a key from the secure repository.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of a key to retrieve.</param>
+        /// <param name="alias">Name of a key to retrieve.</param>
         /// <param name="password">
-        /// 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.
         /// </param>
-        /// <returns>A key specified by alias.</returns>
-        /// <exception cref="ArgumentNullException">
-        /// The alias argument is null.
-        /// </exception>
+        /// <returns>Key specified by alias.</returns>
+        /// <exception cref="ArgumentNullException">Thrown when <paramref name="alias"/> argument is null.</exception>
         /// <exception cref="ArgumentException">
-        /// The alias argument is in the invalid format.
+        /// Thrown when <paramref name="alias"/> argument has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// The key does not exist with the alias or the key-protecting password isn't matched.
+        /// Thrown when key does not exist with given <paramref name="alias"/>
+        /// or the key-protecting password does not match.
         /// </exception>
         static public Key Get(string alias, string password)
         {
@@ -67,11 +66,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// Gets all aliases of keys, which the client can access.
+        /// Gets all aliases of keys accessible by the client.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <returns>All aliases of keys, which the client can access.</returns>
-        /// <exception cref="ArgumentException">No alias to get.</exception>
+        /// <returns>All aliases of keys accessible by the client.</returns>
+        /// <exception cref="ArgumentException">Thrown when there's no alias to get.</exception>
         static public IEnumerable<string> GetAliases()
         {
             IntPtr ptr = IntPtr.Zero;
@@ -94,26 +93,26 @@ namespace Tizen.Security.SecureRepository
         /// Stores a key inside the secure repository based on the provided policy.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of a key to be stored.</param>
-        /// <param name="key">The key's binary value to be stored.</param>
-        /// <param name="policy">The policy about how to store a key securely.</param>
-        /// <exception cref="ArgumentNullException">
-        /// Any of argument is null.
-        /// </exception>
-        /// <exception cref="ArgumentException">
-        /// The alias argument is in the invalid format. key argument is in the invalid format.
-        /// </exception>
-        /// <exception cref="InvalidOperationException">
-        /// The key with alias does already exist.
-        /// </exception>
         /// <remarks>
-        /// 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.
         /// </remarks>
         /// <remarks>
         /// If the password in policy is provided, the key is additionally encrypted with
         /// the password in policy.
         /// </remarks>
+        /// <param name="alias">Name of a key to be stored.</param>
+        /// <param name="key">Key's binary value to be stored.</param>
+        /// <param name="policy">Key storing policy.</param>
+        /// <exception cref="ArgumentNullException">
+        /// Thrown when any provided argument is null.
+        /// </exception>
+        /// <exception cref="ArgumentException">
+        /// Thrown when <paramref name="alias"/> or <paramref name="key"/> argument has an invalid format.
+        /// </exception>
+        /// <exception cref="InvalidOperationException">
+        /// Thrown when key with given alias already exists.
+        /// </exception>
         static public void Save(string alias, Key key, Policy policy)
         {
             if (alias == null || key == null || policy == null)
@@ -126,34 +125,33 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// 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.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="size">
-        /// The size of key strength to be created. 1024, 2048, and 4096 are supported.
-        /// </param>
-        /// <param name="privateKeyAlias">The name of private key to be stored.</param>
-        /// <param name="publicKeyAlias">The name of public key to be stored.</param>
-        /// <param name="privateKeyPolicy">
-        /// The policy about how to store a private key securely.
-        /// </param>
-        /// <param name="publicKeyPolicy">
-        /// The policy about how to store a public key securely.
-        /// </param>
+        /// <remarks>
+        /// 1024, 2048, and 4096 sizes are supported.
+        /// </remarks>
+        /// <remarks>
+        /// If the password in policy is provided, the key is additionally encrypted with the
+        /// password in policy.
+        /// </remarks>
+        /// <param name="size">Size of key strength to be created.</param>
+        /// <param name="privateKeyAlias">Name of a private key to be stored.</param>
+        /// <param name="publicKeyAlias">Name of a public key to be stored.</param>
+        /// <param name="privateKeyPolicy">Private key storing policy.</param>
+        /// <param name="publicKeyPolicy">Public key storing policy.</param>
         /// <exception cref="ArgumentNullException">
-        /// Any of argument is null.
+        /// Thrown when any provided argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The size is invalid. privateKeyAlias or publicKeyAlias is invalid format.
+        /// Thrown when <paramref name="size"/> is invalid.
+        /// Thrown when <paramref name="privateKeyAlias"/> or
+        /// <paramref name="publicKeyAlias"/> has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// The key with privateKeyAlias or publicKeyAlias does already exist.
+        /// Thrown when key with <paramref name="privateKeyAlias"/> or <paramref name="publicKeyAlias"/> already exists.
         /// </exception>
-        /// <remarks>
-        /// If the password in policy is provided, the key is additionally encrypted with the
-        /// password in policy.
-        /// </remarks>
         static public void CreateRsaKeyPair(
             int size, string privateKeyAlias, string publicKeyAlias,
             Policy privateKeyPolicy, Policy publicKeyPolicy)
@@ -172,35 +170,34 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// 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.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="size">
-        /// The size of key strength to be created. 1024, 2048, 3072, and 4096 are
-        /// supported.
-        /// </param>
-        /// <param name="privateKeyAlias">The name of private key to be stored.</param>
-        /// <param name="publicKeyAlias">The name of public key to be stored.</param>
-        /// <param name="privateKeyPolicy">
-        /// The policy about how to store a private key securely.
-        /// </param>
-        /// <param name="publicKeyPolicy">
-        /// The policy about how to store a public key securely.
-        /// </param>
+        /// <remarks>
+        /// 1024, 2048, 3072, and 4096 sizes are supported.
+        /// </remarks>
+        /// <remarks>
+        /// If the password in policy is provided, the key is additionally encrypted with
+        /// the password in policy.
+        /// </remarks>
+        /// <param name="size">Size of key strength to be created.</param>
+        /// <param name="privateKeyAlias">Name of a private key to be stored.</param>
+        /// <param name="publicKeyAlias">Name of a public key to be stored.</param>
+        /// <param name="privateKeyPolicy">Private key storing policy.</param>
+        /// <param name="publicKeyPolicy">Public key storing policy.</param>
         /// <exception cref="ArgumentNullException">
-        /// Any of argument is null.
+        /// Thrown when any provided argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The size is invalid. privateKeyAlias or publicKeyAlias is invalid format.
+        /// Thrown when <paramref name="size"/> is invalid.
+        /// Thrown when <paramref name="privateKeyAlias"/> or
+        /// <paramref name="publicKeyAlias"/> has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// The key with privateKeyAlias or publicKeyAlias does already exist.
+        /// Thrown when key with <paramref name="privateKeyAlias"/> or
+        /// <paramref name="publicKeyAlias"/> already exists.
         /// </exception>
-        /// <remarks>
-        /// If the password in policy is provided, the key is additionally encrypted with
-        /// the password in policy.
-        /// </remarks>
         static public void CreateDsaKeyPair(
             int size, string privateKeyAlias, string publicKeyAlias,
             Policy privateKeyPolicy, Policy publicKeyPolicy)
@@ -219,33 +216,31 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// 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.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="type">The type of elliptic curve of ECDSA.</param>
-        /// <param name="privateKeyAlias">The name of private key to be stored.</param>
-        /// <param name="publicKeyAlias">The name of public key to be stored.</param>
-        /// <param name="privateKeyPolicy">
-        /// The policy about how to store a private key securely.
-        /// </param>
-        /// <param name="publicKeyPolicy">
-        /// The policy about how to store a public key securely.
-        /// </param>
+        /// <remarks>
+        /// If the password in policy is provided, the key is additionally encrypted with
+        /// the password in policy.
+        /// </remarks>
+        /// <param name="type">Type of elliptic curve of ECDSA.</param>
+        /// <param name="privateKeyAlias">Name of private key to be stored.</param>
+        /// <param name="publicKeyAlias">Name of public key to be stored.</param>
+        /// <param name="privateKeyPolicy">Private key storing policy.</param>
+        /// <param name="publicKeyPolicy">Public key storing policy.</param>
         /// <exception cref="ArgumentNullException">
-        /// Any of argument is null.
+        /// Thrown when any provided argument is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The elliptic curve type is invalid. privateKeyAlias or publicKeyAlias is in the
-        /// invalid format.
+        /// Thrown when <paramref name="type"/> is invalid.
+        /// Thrown when <paramref name="privateKeyAlias"/> or
+        /// <paramref name="publicKeyAlias"/> has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// The key with privateKeyAlias or publicKeyAlias does already exist.
+        /// Thrown when key with <paramref name="privateKeyAlias"/> or
+        /// <paramref name="publicKeyAlias"/> already exists.
         /// </exception>
-        /// <remarks>
-        /// If the password in policy is provided, the key is additionally encrypted with
-        /// the password in policy.
-        /// </remarks>
         static public void CreateEcdsaKeyPair(
             EllipticCurveType type, string privateKeyAlias, string publicKeyAlias,
             Policy privateKeyPolicy, Policy publicKeyPolicy)
@@ -262,27 +257,29 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// 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.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="size">
-        /// The size of the key strength to be created. 128, 192 and 256 are supported.
-        /// </param>
+        /// <remarks>
+        /// 128, 192 and 256 sizes are supported.
+        /// </remarks>
+        /// <remarks>
+        /// If the password in policy is provided, the key is additionally encrypted with
+        /// the password in policy.
+        /// </remarks>
+        /// <param name="size">Size of the key strength to be created.</param>
         /// <param name="keyAlias">The name of key to be stored.</param>
-        /// <param name="policy">The policy about how to store the key securely.</param>
+        /// <param name="policy">Key storing policy.</param>
         /// <exception cref="ArgumentNullException">
-        /// The keyAlias or policy is null.
+        /// Thrown when <paramref name="keyAlias"/> or <paramref name="policy"/> is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The key size is invalid. keyAlias is in the invalid format.
+        /// Thrown when <paramref name="size"/> is invalid.
+        /// Thrown when <paramref name="keyAlias"/> has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// The key with privateKeyAlias or publicKeyAlias does already exist.
+        /// Thrown when key with <paramref name="keyAlias"/> already exists.
         /// </exception>
-        /// <remarks>
-        /// If the password in policy is provided, the key is additionally encrypted with
-        /// the password in policy.
-        /// </remarks>
         static public void CreateAesKey(int size, string keyAlias, Policy policy)
         {
             if (size != 128 && size != 192 && size != 256)
index 2458f76ed31045f1f07dfcfcf67f3ea4078f31c9..6cc8290b87fae80f010f4e880bc64fff683a32a0 100644 (file)
@@ -27,31 +27,31 @@ namespace Tizen.Security.SecureRepository
         /// </summary>
         None = 0,
         /// <summary>
-        /// The RSA public key.
+        /// RSA public key.
         /// </summary>
         RsaPublic,
         /// <summary>
-        /// The RSA private key.
+        /// RSA private key.
         /// </summary>
         RsaPrivate,
         /// <summary>
-        /// The ECDSA public key.
+        /// ECDSA public key.
         /// </summary>
         EcdsaPublic,
         /// <summary>
-        /// The ECDSA private key.
+        /// ECDSA private key.
         /// </summary>
         EcdsaPrivate,
         /// <summary>
-        /// The DSA public key.
+        /// DSA public key.
         /// </summary>
         DsaPublic,
         /// <summary>
-        /// The DSA private key.
+        /// DSA private key.
         /// </summary>
         DsaPrivate,
         /// <summary>
-        /// The AES key.
+        /// AES key.
         /// </summary>
         Aes
     }
index 9df853b7b4714b26c0bdcdab54f772dbfc8b60ff..9040d6f42c1985c57b3beb052dee5c107fd574f4 100644 (file)
@@ -26,12 +26,14 @@ namespace Tizen.Security.SecureRepository
     public class Manager
     {
         /// <summary>
-        /// Creates a new full alias, which is concatenation of owner ID and alias.
+        /// Creates a new full alias, which is concatenation of owner ID and alias.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="ownerId">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.</param>
+        /// <remarks>
+        /// 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.
+        /// </remarks>
+        /// <param name="ownerId">Data owner's ID.</param>
         /// <param name="alias">Data alias.</param>
         static public string CreateFullAlias(string ownerId, string alias)
         {
@@ -39,7 +41,7 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// Creates a new full alias, which is concatenation of system service's
+        /// Creates a new full alias, which is concatenation of system service's
         /// owner ID and alias.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
@@ -50,17 +52,21 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// Removes an entry (no matter of type) from the key manager.
+        /// Removes an entry (no matter what type) from the key manager.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">Item alias to be removed.</param>
-        /// <exception cref="ArgumentNullException">The alias is null.</exception>
-        /// <exception cref="ArgumentException">The alias is in the invalid format.</exception>
-        /// <exception cref="InvalidOperationException">The alias does not exist.</exception>
         /// <remarks>
         /// To remove item, client must remove permission to the specified item.
         /// </remarks>
-        /// <remarks>The item owner can remove by default.</remarks>
+        /// <remarks>The item owner can remove an entry by default.</remarks>
+        /// <param name="alias">Item alias to be removed.</param>
+        /// <exception cref="ArgumentNullException">Thrown when <paramref name="alias"/> is null.</exception>
+        /// <exception cref="ArgumentException">
+        /// Thrown when <paramref name="alias"/> is in the invalid format.
+        /// </exception>
+        /// <exception cref="InvalidOperationException">
+        /// Thrown when <paramref name="alias"/> does not exist.
+        /// </exception>
         static public void RemoveAlias(string alias)
         {
             if (alias == null)
@@ -75,6 +81,8 @@ namespace Tizen.Security.SecureRepository
         /// Allows another application to access client's application data.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <remarks>Data identified by alias should exist.</remarks>
+        /// <remarks>The item owner can set permissions.</remarks>
         /// <param name="alias">Item alias for which access will be granted.</param>
         /// <param name="otherPackageId">
         /// Package ID of the application that will gain access rights.
@@ -84,14 +92,15 @@ namespace Tizen.Security.SecureRepository
         /// otherPackageId.
         /// </param>
         /// <exception cref="ArgumentNullException">
-        /// The alias or otherPackageId is null.
+        /// Thrown when <paramref name="alias"/> or <paramref name="otherPackageId"/> is null.
         /// </exception>
         /// <exception cref="ArgumentException">
-        /// The alias or otherPackageId is in the invalid format.
+        /// Thrown when <paramref name="alias"/> or
+        /// <paramref name="otherPackageId"/> has an invalid format.
         /// </exception>
-        /// <exception cref="InvalidOperationException">The alias does not exist.</exception>
-        /// <remarks>Data identified by alias should exist.</remarks>
-        /// <remarks>The item owner can set permissions.</remarks>
+        /// <exception cref="InvalidOperationException">
+        /// Thrown when <paramref name="alias"/> does not exist.
+        ///</exception>
         static public void SetPermission(
             string alias, string otherPackageId, int permissions)
         {
index fb73dba3bf1fff253a7d129a12c3ce8799e8a437..b8bbc896b597020fd8f866e6eedde91be8985f8c 100644 (file)
@@ -23,18 +23,18 @@ using System.Threading.Tasks;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// Enumeration for the OCSP status.
+    /// [Obsolete("Please do not use! This will be deprecated!")]
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     [Obsolete("Please do not use! This will be deprecated with API9 and removed with API11! Please use raw OpenSSL instead!")]
     public enum OcspStatus : int
     {
         /// <summary>
-        /// The OCSP status is good.
+        /// OCSP status is good.
         /// </summary>
         Good = 0x00,
         /// <summary>
-        /// The certificate is revoked.
+        /// Certificate is revoked.
         /// </summary>
         Revoked = 0x01,
         /// <summary>
@@ -42,27 +42,27 @@ namespace Tizen.Security.SecureRepository
         /// </summary>
         Unknown = 0x02,
         /// <summary>
-        /// The certificate does not provide the OCSP extension.
+        /// Certificate does not provide the OCSP extension.
         /// </summary>
         Unsupported = 0x03,
         /// <summary>
-        /// The invalid URL in the certificate OCSP extension.
+        /// Invalid URL in the certificate OCSP extension.
         /// </summary>
         InvalidUrl = 0x04,
         /// <summary>
-        /// The invalid response from the OCSP server.
+        /// Invalid response from the OCSP server.
         /// </summary>
         InvalidResponse = 0x05,
         /// <summary>
-        /// The OCSP remote server error.
+        /// OCSP remote server error.
         /// </summary>
         RemoteError = 0x06,
         /// <summary>
-        /// The Network connection error.
+        /// Network connection error.
         /// </summary>
         NetworkError = 0x07,
         /// <summary>
-        /// An Internal error.
+        /// Internal error.
         /// </summary>
         InternalError = 0x08
     }
index 0afb0e3f63838fad94c44c71c92fbf080eeec685..563e9acda34d004dcd9537ddb3f4186d8b51f1ea 100644 (file)
@@ -22,27 +22,31 @@ using static Interop;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// 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.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    /// <remarks>
+    /// It has a private key or its certificate or all members of a chain of trust.
+    /// </remarks>
     public class Pkcs12
     {
         private SafeCertificateListHandle _certChainHandle = null;
 
         /// <summary>
-        /// Loads the Pkcs12 from the given PKCS#12 file path.
+        /// Loads Pkcs12 from the given PKCS#12 file path.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="filePath">The path of the PKCS12 file to be loaded.</param>
-        /// <param name="filePassword">The passphrase used to decrypt the PCKS12 file.
-        /// If the PKCS12 file is not encrypted, passphrase can be null.</param>
-        /// <exception cref="ArgumentNullException">The filePath is null.</exception>
+        /// <remarks>
+        /// If the PKCS12 file is not encrypted, passphrase can be null.
+        /// </remarks>
+        /// <param name="filePath">Path of the PKCS12 file to be loaded.</param>
+        /// <param name="filePassword">Passphrase used to decrypt the PCKS12 file.</param>
+        /// <exception cref="ArgumentNullException">Thrown when filePath is null.</exception>
         /// <exception cref="InvalidOperationException">
-        /// 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 <paramref name="filePath"/>.
+        /// 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 <paramref name="filePassword"/>.
         /// </exception>
         static public Pkcs12 Load(string filePath, string filePassword)
         {
@@ -66,7 +70,7 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// A constructor of Key that takes a private key.
+        /// Initializes an instance of Pkcs12 class with a private key.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <param name="privateKey">A private key.</param>
@@ -78,14 +82,14 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// 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.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="privateKey">A private key.</param>
-        /// <param name="certificate">A certificate corresponding the private key.</param>
+        /// <param name="privateKey">Private key.</param>
+        /// <param name="certificate">Certificate corresponding to the private key.</param>
         /// <param name="caChain">
-        /// A certificate chain of CA(Certificate Authority) that issued the certificate.
+        /// Certificate chain of CA (Certificate Authority) that issued the certificate.
         /// </param>
         public Pkcs12(Key privateKey,
                       Certificate certificate,
@@ -150,8 +154,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// A private key.
+        /// Gets and sets private key.
         /// </summary>
+        /// <value>
+        /// Private key.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public Key PrivateKey
         {
@@ -159,8 +166,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// A certificate corresponding to the private key.
+        /// Gets and sets a certificate.
         /// </summary>
+        /// <value>
+        /// Certificate corresponding to the private key.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public Certificate Certificate
         {
@@ -168,8 +178,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// A certificate chain of CA(Certificate Authority) that issued the certificate.
+        /// Gets and sets a certificate chain.
         /// </summary>
+        /// <value>
+        /// Certificate chain of CA (Certificate Authority) that issued the certificate.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public IEnumerable<Certificate> CaChain
         {
index 8775ab5f3a60ac51400874ddebc87f1839c4d5e6..a485ec5ca5c9714b1f1d729b1ca0a4a873b9c1fc 100644 (file)
@@ -20,7 +20,7 @@ using static Interop;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// This class provides the methods for storing and retrieving the Pkcs12 contents.
+    /// Provides methods for storing and retrieving Pkcs12 contents.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class Pkcs12Manager : Manager
@@ -29,25 +29,28 @@ namespace Tizen.Security.SecureRepository
         /// Gets Pkcs12 contents from the secure repository.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of data to retrieve.</param>
-        /// <param name="keyPassword">
-        /// The password used in decrypting a private key value. If password of
-        /// keyPolicy is provided in SavePkcs12(), the same password should be provided.
-        /// </param>
+        /// <remarks>
+        /// If password of keyPolicy is provided in SavePkcs12(),
+        /// the same password should be provided in as keyPassword argument.
+        /// </remarks>
+        /// <remarks>
+        /// If password of certificatePolicy is provided in SavePkcs12(),
+        /// the same password should be provided in as cerificatePassword argument.
+        /// </remarks>
+        /// <param name="alias">Name of data to retrieve.</param>
+        /// <param name="keyPassword">Password used in decrypting a private key value.</param>
         /// <param name="cerificatePassword">
-        /// 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.
         /// </param>
-        /// <returns>Pkcs12 data specified by alias.</returns>
-        /// <exception cref="ArgumentNullException">The alias argument is null.</exception>
+        /// <returns>Pkcs12 data specified by alias.</returns>
+        /// <exception cref="ArgumentNullException">Thrown when <paramref name="alias"/> argument is null.</exception>
         /// <exception cref="ArgumentException">
-        /// The alias argument is in the invalid format.
+        /// Thrown when <paramref name="alias"/> argument has an invalid format.
         /// </exception>
         /// <exception cref="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.
+        /// Thrown when Pkcs12 does not exist with given <paramref name="alias"/>.
+        /// Thrown when optional password of key in Pkcs12 does not match.
+        /// Thrown when optional password of certificate in Pkcs12 does not match.
         /// </exception>
         static public Pkcs12 Get(
             string alias, string keyPassword, string cerificatePassword)
@@ -73,24 +76,23 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// 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.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="alias">The name of a data to be stored.</param>
-        /// <param name="pkcs12">The pkcs12 data to be stored.</param>
-        /// <param name="keyPolicy">
-        /// The policy about how to store pkcs's private key.
-        /// </param>
-        /// <param name="certificatePolicy">
-        /// The policy about how to store pkcs's certificate.
-        /// </param>
-        /// <exception cref="ArgumentNullException">Any of argument is null.</exception>
+        /// <param name="alias">Name of a data to be stored.</param>
+        /// <param name="pkcs12">pkcs12 data to be stored.</param>
+        /// <param name="keyPolicy">Pkcs' private key storing policy.</param>
+        /// <param name="certificatePolicy">Pkcs' certificate storing policy.</param>
+        /// <exception cref="ArgumentNullException">
+        /// Thrown when any provided argument is null.
+        /// </exception>
         /// <exception cref="ArgumentException">
-        /// The alias argument is in the invalid format. Pkcs12 argument is in the invalid format.
+        /// Thrown when <paramref name="alias"/> or
+        /// <paramref name="pkcs12"/> argument has an invalid format.
         /// </exception>
         /// <exception cref="InvalidOperationException">
-        /// Pkcs12 with alias does already exist.
+        /// Thrown when pkcs12 with given <paramref name="alias"/> already exists.
         /// </exception>
         static public void Save(
             string alias, Pkcs12 pkcs12, Policy keyPolicy, Policy certificatePolicy)
index ba3a8851fb191cf67298b168d0f1cbffb679dadd..f9df72a270f95fb3732f3b0e4862f9fc3ce2d102 100644 (file)
@@ -20,16 +20,16 @@ using static Interop;
 namespace Tizen.Security.SecureRepository
 {
     /// <summary>
-    /// A class for a policy for storing key, certificate, and binary data.
+    /// Stores policy for key, certificate, and binary data.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public class Policy
     {
         /// <summary>
-        /// A default constructor of Policy with default policy.
+        /// Initializes an instance of Policy class.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <remarks>The default value for Password is null and the default value for Extractabl is false.</remarks>
+        /// <remarks>Default value for Password is null and default value for Extractable is false.</remarks>
         public Policy()
         {
             Password = null;
@@ -37,10 +37,10 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// A constructor of Key that takes the password and the flag for extractable.
+        /// Initializes an instance of Policy class with password and extractable flag.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <param name="password">Used to encrypt data secure repository.</param>
+        /// <param name="password">Used to encrypt data in secure repository.</param>
         /// <param name="extractable">If true, key may be extracted from the secure repository.</param>
         public Policy(String password, bool extractable)
         {
@@ -49,9 +49,12 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// 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.
         /// </summary>
+        /// <value>
+        /// 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.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public String Password
         {
@@ -59,8 +62,11 @@ namespace Tizen.Security.SecureRepository
         }
 
         /// <summary>
-        /// If true, key may be extracted from the secure repository.
+        /// Gets and sets Extractable flag.
         /// </summary>
+        /// <value>
+        /// Extractable flag. If true, key may be extracted from the secure repository.
+        /// </value>
         /// <since_tizen> 3 </since_tizen>
         public bool Extractable
         {