* The serial number is an integer assigned by the Certification Authority (CA) to each certificate. It is unique for each certificate issued by a
* given CA (that is, the issuer name and serial number must identify a unique certificate). @n
*
- * The ASN.1 definition for this is as follows:
+ * This is defined in ASN.1 as demonstrated in the following code:
*
* @code
* serialNumber CertificateSerialNumber.
* It is valid if the current date and time are within the validity period given in the certificate. @n
* The validity period consists of two date and time values: the initial date and time, and the final date and time until the validity of the certificate. @n
*
- * It is defined in ASN.1 as:
+ * This is defined in ASN.1 as demonstrated in the following code:
*
* @code
* validity Validity
/**
* Gets the specification version value (version number) from the certificate. @n
*
- * The ASN.1 definition for this is as follows:
+ * This is defined in ASN.1 as demonstrated in the following code:
*
* @code
* version [0] EXPLICIT Version DEFAULT v1
* The serial number is an integer assigned by the Certification Authority (CA) to each certificate. It is unique for each certificate issued by a given
* CA (that is, the issuer name and serial number must identify a unique certificate). @n
*
- * The ASN.1 definition for this is as follows:
+ * This is defined in ASN.1 as demonstrated in the following code:
*
* @code
* serialNumber CertificateSerialNumber
* It is valid if the current date and time are within the validity period given in the certificate. The validity period consists of two date and time
* values: the initial date and time, and the final date and time until the validity of the certificate. @n
*
- * It is defined in ASN.1 as:
+ * This is defined in ASN.1 as demonstrated in the following code:
*
* @code
* validity Validity
* Gets the signature algorithm identifier from the given certificate. @n
* For example, the string "SHA-1/DSA". @n
*
- * The ASN.1 definition for this is as follows:
+ * This is defined in ASN.1 as demonstrated in the following code:
*
* @code
* signatureAlgorithm AlgorithmIdentifier
* @since 2.0
*
* @return An error code
- * @param[in] key An instance of IKey
- * Key can be in PEM/DER/PKCS8 format only.
+ * @param[in] key An instance of IKey @n
+ * The @c key can be in PEM/DER/PKCS8 format only.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c key is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*
* @return An error code
* @param[in] key An instance of IKey
- * Key can be in PEM/DER/X509 public key format only.
+ * The @c key can be in PEM/DER/X509 public key format only.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c key is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
/**
* Signs the data. @n
- * This API only supports sha1withRsa for signing the data
+ * The %SignN() method only supports sha1withRsa for signing the data
* @since 2.0
*
* @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
/**
* Signs the data. @n
- * This API provides the additional option to developer for setting digest algorithm that is needed for signing the data
+ * The %SignN() method provides the additional option to developer for setting digest algorithm that is needed for signing the data
*
* @since 2.0
*
/**
* Verifies the data. @n
* The verification is done by comparing the @c signedData to the signature created by the @c data. @
- * This API only supports sha1withRsa for verifying the signed data
+ * The %Verify() method only supports sha1withRsa for verifying the signed data
*
* @since 2.0
*
/**
* Verifies the data. @n
* The verification is done by comparing the @c signedData to the signature created by the @c data. @n
- * This API provides the additional option to developer for setting digest algorithm that is needed for verifying the signed data
+ * The %Verify() method provides the additional option to developer for setting digest algorithm that is needed for verifying the signed data
*
* @since 2.0
*
virtual Tizen::Base::ByteBuffer* GetHashN(const Tizen::Base::ByteBuffer& input) const;
/**
- * Initializes the multiple-part hash operation.
+ * Initializes a multiple-part hash operation.
*
* @since 2.0
*
virtual Tizen::Base::ByteBuffer* GetHmacN(const Tizen::Base::ByteBuffer& input) const;
/**
- * Initializes the multiple-part HMAC operation.
+ * Initializes a multiple-part HMAC operation.
*
* @since 2.0
*
virtual Tizen::Base::ByteBuffer* DecryptN(const Tizen::Base::ByteBuffer& input);
/**
- * Initializes the multiple-part encryption or decryption operation.
+ * Initializes a multiple-part encryption or decryption operation.
*
* @since 2.0
*
* @file FSecCryptoTypes.h
* @brief This is the header file that defines the different enumerations.
*
- * This is the header file that defines the different enumerations that can be used for cryptography.
+ * This header file defines the different enumerations that can be used for cryptography.
*/
#ifndef _FSEC_CRYPTO_TYPES_H_
#define _FSEC_CRYPTO_TYPES_H_
/**
* @namespace Tizen::Security::Pkcs
- * @brief This namespace contains classes and interfaces for managing the Pkcs 5 and 8 implementation.
+ * @brief This namespace contains classes and interfaces for managing the PKCS 5 and 8 implementation.
* @since 2.1
*
* @remarks @b Header @b %file: @b \#include @b <FSecurity.h> @n
* @b Library : @b osp-appfw
*
*
- * The %Pkcs namespace provides classes and interfaces for managing Pkcs 5 and 8 implementation.
+ * The %Pkcs namespace provides classes and interfaces for managing PKCS 5 and 8 implementation.
* It provides a mechanism for password based key derivation, encryption/decryption @n
* mac genaration/verification.
* It also provides a standard format to store private key and encrypted private key.
/**
* @class AlgorithmIdentifier
- * @brief This class implements the ASN.1 specified AlgorithmIdentifier, which is used for
- * creating the standard AlgorithmIdentifier object.
- * AlgorithmIdentifier structure consist the OID value of the Algorithm
- * and the parameters of that algorithm.
+ * @brief This class implements the ASN.1 specified %AlgorithmIdentifier, which is used for
+ * creating the standard %AlgorithmIdentifier object.
*
- * It is defined in ASN.1 as
+ * @since 2.1
+ *
+ * The %AlgorithmIdentifier class implements the ASN.1 specified %AlgorithmIdentifier, which is used for
+ * creating the standard %AlgorithmIdentifier object.
+ * %AlgorithmIdentifier structure consists the OID value of the algorithm along with the parameters of that algorithm.
*
+ * This is defined in ASN.1 as demonstrated in the following code:
+ * @code
* AlgorithmIdentifier { ALGORITHM-IDENTIFIER:InfoObjectSet }
* ::=
* SEQUENCE {
* parameters ALGORITHM-IDENTIFIER.&Type({InfoObjectSet}
* {@algorithm}) OPTIONAL }
* ALGORITHM-IDENTIFIER ::= TYPE-IDENTIFIER
- * @since 2.1
+ * @endcode
*
*/
virtual ~AlgorithmIdentifier(void);
/**
- * Initializes the %AlgorithmIdentifier with supplied input parameters values.
+ * Initializes the %AlgorithmIdentifier with supplied input parameter values.
*
* @since 2.1
*
* @return An error code
- * @param[in] objectId This parameter specifies object Identifier of particular algorithm. Object IDs
- * are defined by standard bodies for algorithms and other crypto objects.Object ID of AlgorithmIdentifier can be described in string format like 1.2.3.4
- * @param[in] pParams This parameter specifies a pointer to AlgorithmParameters object. This is an
- * optional parameter and contains a list of user supplied input parameters for the specified algorithm.
- * For example, for Symmetric algorithms Initial vector (IV) is required as input.
- * The default value of this parameter is NULL.
+ * @param[in] objectId The object identifier of a particular algorithm @n
+ * Object IDs are defined by standard bodies for algorithms and other crypto objects.
+ * Object ID of %AlgorithmIdentifier can be described in string format like 1.2.3.4
+ * @param[in] pParams A pointer to the AlgorithmParameters object @n
+ * This is an optional parameter and contains a list of user specified input parameters for the specified algorithm. For example, for Symmetric algorithms Initial vector, IV is required as an input. The default value of this parameter is @c null.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_UNSUPPORTED_ALGORITHM The object id of the input algorithm is not supported.
+ * @exception E_UNSUPPORTED_ALGORITHM The object ID of the input algorithm is not supported.
*/
result Construct(const Tizen::Base::String& objectId, const IAlgorithmParameters* pParams = null);
/**
- * Initializes this instance of %AlgorithmIdentifier with the DER encoded Bytebuffer that conatins @n
- * the ASN.1 specified AlgorithmIdentifier structure.
+ * Initializes this instance of %AlgorithmIdentifier with the DER encoded Tizen::Base::Bytebuffer that conatins @n
+ * the ASN.1 specified %AlgorithmIdentifier structure.
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData An instance of DER encoded ByteBuffer
+ * @param[in] encodedData An instance of DER encoded Tizen::Base::ByteBuffer
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
virtual int GetHashCode(void) const;
/**
- * Get the copy of AlgorithmIdentifier instance.
+ * Gets the copy of %AlgorithmIdentifier instance.
*
* @since 2.1
*
- * @return Pointer to AlgorithmIdentifier, containing the copy of this instance, @n
- * else @c null if an error occurs.
+ * @return Pointer to %AlgorithmIdentifier, containing the copy of the specified instance, @n
+ * else @c null if an error occurs
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
AlgorithmIdentifier* CloneN(void) const;
* @since 2.1
*
* @return Pointer to IAlgorithmParameters, containing the parameter list of algorithm, @n
- * else @c null if an no parameters exist.
+ * else @c null if an no parameters exist
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
IAlgorithmParameters* GetParametersN(void) const;
/**
- * Gets the object Id value of an algorithm in string format.
+ * Gets the object ID value of an algorithm in string format.
*
* @since 2.1
*
- * @return Object ID of AlgorithmIdentifier in string format like 1.2.3.4.
+ * @return Object ID of %AlgorithmIdentifier in string format like 1.2.3.4
*
*/
Tizen::Base::String GetAlgorithmObjectId(void) const;
/**
- * Gets the encoded form of the AlgorithmIdentifier. @n
- * It is assumed that each AlgorithmIdentifier type will have only a single form of encoding that is DER encoding.
+ * Gets the encoded form of the %AlgorithmIdentifier. @n
+ * It is assumed that each %AlgorithmIdentifier type will have only a single form of encoding that is DER encoding.
*
* @since 2.1
*
- * @return Pointer to the DER encoded ByteBuffer, @n
- * else @c null if an error occurs.
+ * @return Pointer to the DER encoded Tizen::Base::ByteBuffer, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
* @interface IAlgorithmParameters
- * @brief This is an interface class for cryptographic algorithm parameters like IV etc. It provides the generic
- * functionalities which must be supported by all derived algorithm parameters like PbKdf2Parameters, PbEs2Parameters.
- * This is an abstract class and hence object of this class cannot be instantiated.
+ * @brief This interface is an interface class for cryptographic algorithm parameters such as IV, etc. It provides the generic
+ * functionalities that must be supported by all derived algorithm parameters such PbKdf2Parameters, PbEs2Parameters.
+ *
* @since 2.1
*
+ * The %IAlgorithmParameters interface is an interface class for cryptographic algorithm parameters such as IV, etc. It provides the generic
+ * functionalities that must be supported by all derived algorithm parameters such PbKdf2Parameters, PbEs2Parameters.
+ * This is an abstract class and hence, object of this class cannot be instantiated.
+ *
*/
class _OSP_EXPORT_ IAlgorithmParameters
virtual ~IAlgorithmParameters(void) {}
/**
- * Get the copy of parameters of the specified algorithm type.
+ * Gets the copy of parameters of the specified algorithm type.
*
* @since 2.1
*
* @return Pointer to AlgorithmParameters, containing the instance of algorithm parameter , @n
- * else @c null if an error occurs.
+ * else @c null if an error occurs
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual IAlgorithmParameters* CloneN(void) const = 0;
/**
- * Get the pkcs algorithm parameter type enumerated value.
+ * Gets the PKCS algorithm parameter type enumerated value.
*
* @since 2.1
*
- * @return PkcsAlgorithmParamterType, containing the enumerated value of PkcsAlgorithmParameterType.
+ * @return PkcsAlgorithmParamterType, containing the enumerated value of PkcsAlgorithmParameterType
*
*/
virtual PkcsAlgorithmParameterType GetType(void) const = 0;
/**
* @class InitialVector
- * @brief This class implements the functionalities specified by the InitialVector class.
- * This class represents the Initial Vector parameter for symmetric ciphers like DES, AES, DES_EDE.
- * This InitialVector Parameters will be used by both Pkcs05 and Pkcs08 related classes at the time of encryption.
+ * @brief This class implements the functionalities specified by the %InitialVector class.
+ *
* @since 2.1
*
+ * The %InitialVector class implements the functionalities specified by the %InitialVector class.
+ * This class represents the Initial Vector parameter for symmetric ciphers such as DES, AES, DES_EDE.
+ * This %InitialVector parameters will be used by both PKCS05 and PKCS08 related classes at the time of encryption.
+ *
*
*/
*
* @return An error code
*
- * @param[in] initialVector An instance of ByteBuffer, holding the initial vector data.
+ * @param[in] initialVector An instance of Tizen::Base::ByteBuffer, holding the initial vector data
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& initialVector);
/**
- * Get copy of this instance.
+ * Gets copy of this instance.
*
* @since 2.1
*
- * @return A pointer to IAlgorithmParameters, containing the copy of this instance.
+ * @return A pointer to IAlgorithmParameters, containing the copy of this instance
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual IAlgorithmParameters* CloneN(void) const;
/**
- * Get the algorithm parameter type enum value for Initial Vector.
+ * Gets the algorithm parameter type enum value for Initial Vector.
*
* @since 2.1
*
- * @return PkcsAlgorithmParameterType Enum value containing the PKCS_ALGO_PARAM_TYPE_IV value for Initial vector parameter.
+ * @return PkcsAlgorithmParameterType Enum value containing the PKCS_ALGO_PARAM_TYPE_IV value for Initial Vector parameter
*
*/
virtual PkcsAlgorithmParameterType GetType(void) const;
virtual int GetHashCode(void) const;
/**
- * Get the instance of byte buffer that contains the Initial vector value.
+ * Gets the instance of Tizen::Base::ByteBuffer that contains the Initial Vector value.
*
* @since 2.1
*
- * @return A reference to the ByteBuffer class that contains the output.
+ * @return A reference to the Tizen::Base::ByteBuffer class that contains the output
*/
const Tizen::Base::ByteBuffer& GetInitialVector(void) const;
*
* @since 2.1
*
- * @return Pointer to the DER encoded ByteBuffer, @n
- * else @c null if an error occurs.
+ * @return Pointer to the DER encoded Tizen::Base::ByteBuffer, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
* @class Pkcs05PbEs2Parameters
- * @brief This class implements the functionalities specified by the Pkcs05 encryption scheme 2.
- * PBES2 combines a password-based key derivation function, which shall be PBKDF2
- * for PKCS #5 version 2.1, with an underlying encryption scheme
- * The key length and any other parameters for the underlying encryption scheme depend on the scheme.
+ * @brief This class implements the functionalities specified by the PKCS05 encryption scheme 2.
*
- * It is defined in ASN.1 as:
+ * @since 2.1
+ *
+ * The %Pkcs05PbEs2Parameters class implements the functionalities specified by the PKCS05 encryption scheme 2.
+ * PBES2 combines a password-based key derivation function, which is PBKDF2
+ * for PKCS #5 version 2.1, with an underlying encryption scheme.
+ * The key length and any other parameters for the underlying encryption scheme depends on the scheme.
*
+ * This is defined in ASN.1 as demonstrated in the following code:
+ * @code
* PBES2-params ::= SEQUENCE {
* keyDerivationFunc AlgorithmIdentifier {{PBES2-KDFs}},
* encryptionScheme AlgorithmIdentifier {{PBES2-Encs}} }
- * @since 2.1
+ * @endcode
*
*/
virtual ~Pkcs05PbEs2Parameters(void);
/**
- * Initializes this instance of %Pkcs05PbEs2Parameters with the encoded Bytebuffer which contain Password based encryption @n
- * parameters structure(PBES2) in ASN.1 DER format.
+ * Initializes this instance of %Pkcs05PbEs2Parameters with the encoded Tizen::Base::Bytebuffer, which contain Password Based Encryption Parameters Structure(PBES2) in ASN.1 DER format.
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData DER encoded Bytebuffer contains Pkcs05PbEs2Parameters.
+ * @param[in] encodedData DER encoded Tizen::Base::Bytebuffer containing %Pkcs05PbEs2Parameters
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& encodedData);
/**
- * Initializes the %Pkcs05PbEs2Parameters with supplied input parameters values.
+ * Initializes this %Pkcs05PbEs2Parameters with specified input parameters values.
*
* @since 2.1
*
* @return An error code
- * @param[in] keyDerivationFunction An instance of AlgorithmIdentifier, holding key derivation function.
- * @param[in] encryptionScheme An instance of AlgorithmIdentifier, holding encryption scheme.
+ * @param[in] keyDerivationFunction An instance of AlgorithmIdentifier, holding key derivation function
+ * @param[in] encryptionScheme An instance of AlgorithmIdentifier, holding encryption scheme
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const AlgorithmIdentifier& keyDerivationFunction, const AlgorithmIdentifier& encryptionScheme);
/**
- * Gets the encoded form of the Pkcs05PbEs2Parameters.
- * It is assumed that each Pkcs05PbEs2Parameters will have only a single form of encoding example ASN.1 DER.
+ * Gets the encoded form of the %Pkcs05PbEs2Parameters. @n
+ * It is assumed that each %Pkcs05PbEs2Parameters will have only a single form of encoding example ASN.1 DER.
*
* @since 2.1
*
- * @return A pointer to the ByteBuffer class that contains the output, @n
- * else @c null if an error occurs.
+ * @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
Tizen::Base::ByteBuffer* GetEncodedDataN(void) const;
/**
- * Get the reference to the AlgorithmIdentifier instance which identifies the underlying key derivation function.
- * It shall be an algorithm ID with an OID in the set PBES2-KDFs, which for this version of PKCS #5 shall consist of id-PBKDF2.
+ * Gets the reference to the AlgorithmIdentifier instance, which identifies the underlying key derivation function. @n
+ * It will be an algorithm ID with an OID in the set PBES2-KDFs, which for this version of PKCS #5 will consist of id-PBKDF2.
*
* @since 2.1
*
- * @return A reference to AlgorithmIdentifier holding the underlying key derivation function.
+ * @return A reference to AlgorithmIdentifier holding the underlying key derivation function
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const AlgorithmIdentifier& GetKeyDerivationAlgorithm(void) const;
/**
- * Get the reference to the AlgorithmIdentifier instance which identifies the underlying encryption algorithm.
+ * Gets the reference to the AlgorithmIdentifier instance, which identifies the underlying encryption algorithm. @n
* It shall be an OID in the set PBES2-Encs, whose definition is left to the application.
*
* @since 2.1
*
- * @return A reference to AlgorithmIdentifier holding the underlying encryption algorithm.
+ * @return A reference to AlgorithmIdentifier holding the underlying encryption algorithm
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const AlgorithmIdentifier& GetEncryptionScheme(void) const;
/**
- * Get the AlgorithmParameters which identifies the underlying Parameters like PbKdf2,PbEs2,PbMac1.
- * For this class AlgorithmParameters will be of Pbes2 type.
+ * Gets the AlgorithmParameters that identifies the underlying parameters such as PbKdf2, PbEs2, PbMac1. @n
+ * For this class %AlgorithmParameters will be of PBES2 type.
*
* @since 2.1
*
* @return A pointer to IAlgorithmParameters containing the algorithm identifier of underlying pseudo random function, @n
- * else @c null if an error occurs.
+ * else @c null if an error occurs
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual IAlgorithmParameters* CloneN(void) const;
/**
*
- * Get the PkcsAlgorithmParameterType value.
+ * Gets the PkcsAlgorithmParameterType value.
*
* @since 2.1
*
- * @return PkcsAlgorithmParameterType holding enum value PKCS_ALGO_PARAM_TYPE_PKCS05_PBES02 for PBES2 Parameters.
+ * @return PkcsAlgorithmParameterType holding enum value @c PKCS_ALGO_PARAM_TYPE_PKCS05_PBES02 for PBES2 Parameters
*
*/
virtual PkcsAlgorithmParameterType GetType(void) const;
/**
* @class Pkcs05PbKdf2Parameters
- * @brief This class implements the functionalities specified by the Pkcs05 KDF2 scheme. PBKDF2 applies a pseudo random function to derive
- * keys. The length of the derived key is essentially unbounded. However, the maximum effective search space for the derived key may
- * be limited by the structure of the underlying pseudorandom function.
+ * @brief This class implements the functionalities specified by the PKCS05 KDF2 scheme.
*
- * It is defined in ASN.1 as:
+ * @since 2.1
+ *
+ * The %Pkcs05PbKdf2Parameters class implements the functionalities specified by the PKCS05 KDF2 scheme. PBKDF2 applies a pseudo random function to derive
+ * keys. The length of the derived key is essentially unbounded. However, the maximum effective search space for the derived key can
+ * be limited by the structure of the underlying pseudo random function.
*
+ * This is defined in ASN.1 as demonstrated in the following code:
+ * @code
* PBKDF2-params ::= SEQUENCE {
* salt CHOICE {
* specified OCTET STRING,
* keyLength INTEGER (1..MAX) OPTIONAL,
* prf AlgorithmIdentifier {{PBKDF2-PRFs}} DEFAULT
* algid-hmacWithSHA1 }
- * @since 2.1
+ * @endcode
*
*/
virtual ~Pkcs05PbKdf2Parameters(void);
/**
- * Initializes this instance of %Pkcs05PbKdf2Parameters with the encoded Bytebuffer which contain password based @n
- * key derivation function parameters structure(PBKDF2) in ASN.1 DER format.
+ * Initializes this instance of %Pkcs05PbKdf2Parameters with the encoded Tizen::Base::Bytebuffer that contains Password Based Key Derivation Function parameters structure(PBKDF2) in ASN.1 DER format.
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData DER encoded ByteBuffer of Pkcs05PbKdf2Parameters.
+ * @param[in] encodedData DER encoded Tizen::Base::ByteBuffer of %Pkcs05PbKdf2Parameters
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& encodedData);
/**
- * Initializes the %Pkcs05PbKdf2Parameters with supplied input parameters values.
+ * Initializes the %Pkcs05PbKdf2Parameters with specified input parameters values.
*
* @since 2.1
*
* @return An error code
- * @param[in] saltBuffer An instance of ByteBuffer, holding salt value.
+ * @param[in] saltBuffer An instance of Tizen::Base::ByteBuffer, holding salt value
* @param[in] iterationCount Integer value holding the positive integer specifying iteration count
- * for generation of password based key.
- * @param[in] derivedKeyLength Positive integer specifying length of password based key to be generated.
+ * for generation of password based key
+ * @param[in] derivedKeyLength Positive integer specifying length of password based key to generate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @remark In this case when pseudo random function algorithm is not passed then default HMAC-SHA1 will be used.
+ * @remark In this case, when pseudo random function algorithm is not passed, then default HMAC-SHA1 will be used.
*/
result Construct(const Tizen::Base::ByteBuffer& saltBuffer, int iterationCount, int derivedKeyLength = 0);
/**
- * Initializes the %Pkcs05PbKdf2Parameters with supplied input parameters values.
+ * Initializes this %Pkcs05PbKdf2Parameters with supplied input parameters values.
*
* @since 2.1
*
* @return An error code
- * @param[in] saltBuffer An instance of ByteBuffer, holding salt value.
+ * @param[in] saltBuffer An instance of Tizen::Base::ByteBuffer, holding salt value
* @param[in] iterationCount Integer value holding the positive integer specifying iteration count
- * for generation of password based key.
- * @param[in] prf An instance of AlgorithIdentifier, holding the underlying pseudo-random function to use for
- * generation of password based key.
- * @param[in] derivedKeyLength Positive integer specifying length of password based key to be generated.
+ * for generation of password based key
+ * @param[in] prf An instance of AlgorithIdentifier, holding the underlying pseudo random function to use to generate a password based key
+ * @param[in] derivedKeyLength Positive integer specifying length of password based key to generate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& saltBuffer, int iterationCount, const AlgorithmIdentifier& prf, int derivedKeyLength = 0);
/**
- * Gets the encoded form of the Pkcs05PbKdf2Parameters.
- * It is assumed that each Pkcs05PbKdf2Parameters will have only a single form of encoding example ASN.1 DER.
+ * Gets the encoded form of the %Pkcs05PbKdf2Parameters. @n
+ * It is assumed that each %Pkcs05PbKdf2Parameters will have only a single form of encoding, for example: ASN.1 DER.
*
* @since 2.1
*
- * @return A pointer to the ByteBuffer class that contains the output, @n
- * else @c null if an error occurs.
+ * @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
Tizen::Base::ByteBuffer* GetEncodedDataN(void) const;
/**
- * Get the salt byte buffer.
+ * Gets the salt byte buffer.
*
* @since 2.1
*
- * @return A reference to Salt ByteBuffer Containing the specified salt value.
+ * @return A reference to salt Tizen::Base::ByteBuffer containing the specified salt value
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const Tizen::Base::ByteBuffer& GetSaltValue(void) const;
/**
- * Get the iteration count.
- * The purpose of this count is to increase the cost of producing keys from a password, thereby also increasing the difficulty of attack.
+ * Gets the iteration count. @n
+ * The purpose of this count is to increase the cost of producing keys from a password, thereby, also increasing the difficulty of attack.
*
* @since 2.1
*
- * @return An integer value containing the iteration count for PBKDF2.
+ * @return An integer value containing the iteration count for PBKDF2
*
*/
int GetIterationCount(void) const;
/**
- * Get the derived key length.
- * This API will return the length of the derived key that will be used for generating the password based key.
+ * Gets the derived key length. @n
+ * The %GetDerivedKeyLength() method returns the length of the derived key that is used to generate the password based key.
*
* @since 2.1
*
- * @return An integer value containing the length of the derived key.
+ * @return An integer value containing the length of the derived key
*
*/
int GetDerivedKeyLength(void) const;
/**
- * Get the reference to the Algorithm Identifier which identifies the underlying pseudo random function.
+ * Gets the reference to the AlgorithmIdentifier that identifies the underlying pseudo random function.
*
* @since 2.1
*
- * @return A reference to AlgorithmIdentifier Containing the algorithm identifier of underlying pseudo random function.
+ * @return A reference to AlgorithmIdentifier containing the algorithm identifier of underlying pseudo random function
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const AlgorithmIdentifier& GetPrf(void) const;
/**
*
- * Get the pointer to the AlgorithmParameters which identifies the underlying Parameters like PbKdf2,PbEs2,PbMac1.
- * For this class AlgorithmParameters will be of PbKdf2 type.
+ * Gets the pointer to the AlgorithmParameters that identifies the underlying parameters such as PbKdf2,PbEs2,PbMac1. @n
+ * For this class %AlgorithmParameters will be of PbKdf2 type.
*
* @since 2.1
*
- * @return Pointer to IAlgorithmParameters Containing the algorithm identifier of underlying pseudo random function, @n
- * else @c null if an error occurs.
+ * @return Pointer to IAlgorithmParameters containing the algorithm identifier of underlying pseudo random function, @n
+ * else @c null if an error occurs
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual IAlgorithmParameters* CloneN(void) const;
/**
- * Get the PkcsAlgorithmParameterType value.
+ * Gets the PkcsAlgorithmParameterType value.
*
* @since 2.1
*
- * @return PkcsAlgorithmParameterType holding enum value PKCS_ALGO_PARAM_TYPE_PKCS05_KDF02 for KDF2 Parameters.
+ * @return PkcsAlgorithmParameterType holding enum value @c PKCS_ALGO_PARAM_TYPE_PKCS05_KDF02 for KDF2 Parameters
*/
virtual PkcsAlgorithmParameterType GetType(void) const;
/**
* @class Pkcs05PbMacParameters
- * @brief This class implements the functionalities specified by the Pkcs05 MAC scheme.
- * PBMAC1 combines a password-based key derivation function, which shall be PBKDF2
+ * @brief This class implements the functionalities specified by the PKCS05 MAC scheme.
+ *
+ * @since 2.1
+ *
+ * The %Pkcs05PbMacParameters class implements the functionalities specified by the PKCS05 MAC scheme.
+ * PBMAC1 combines a password-based key derivation function, which will be PBKDF2
* for this version of PKCS #5, with an underlying message authentication
* scheme. The key length and any other parameters for
* the underlying message authentication scheme depend on the scheme.
*
- * It is defined in ASN.1 as:
- *
+ * This is defined in ASN.1 as demonstrated in the following code:
+ * @code
* PBMAC1-params ::= SEQUENCE {
* keyDerivationFunc AlgorithmIdentifier {{PBMAC1-KDFs}},
* messageAuthScheme AlgorithmIdentifier {{PBMAC1-MACs}} }
- * @since 2.1
+ * @endcode
*
*/
virtual ~Pkcs05PbMacParameters(void);
/**
- * Initializes this instance of %Pkcs05PbMacParameters with the Bytebuffer which contain Password based message @n
- * authentication parameters structure(PBMAC1) in ASN.1 DER format.
+ * Initializes this instance of %Pkcs05PbMacParameters with the Tizen::Base::ByteBuffer instance that contains Password Based Message @n
+ * Authentication Cyrptography parameters structure(PBMAC1) in ASN.1 DER format.
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData DER encoded Bytebuffer contains Pkcs05PbMacParameters.
+ * @param[in] encodedData DER encoded Tizen::Base::ByteBuffer contains %Pkcs05PbMacParameters.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& encodedData);
/**
- * Initializes the %Pkcs05PbMacParameters with supplied input parameters values.
+ * Initializes this %Pkcs05PbMacParameters with specified input parameter values.
*
* @since 2.1
*
* @return An error code
- * @param[in] keyDerivationFunc An instance of AlgorithmIdentifier, holding key derivation function.
- * @param[in] messageAuthScheme An instance of AlgorithmIdentifier, holding message authentication scheme.
+ * @param[in] keyDerivationFunc An instance of AlgorithmIdentifier, holding key derivation function
+ * @param[in] messageAuthScheme An instance of AlgorithmIdentifier, holding message authentication scheme
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const AlgorithmIdentifier& keyDerivationFunc, const AlgorithmIdentifier& messageAuthScheme);
/**
- * Gets the encoded form of the Pkcs05PbMacParameters.
- * It is assumed that each Pkcs05PbMacParameters will have only a single form of encoding example ASN.1 DER.
+ * Gets the encoded form of the %Pkcs05PbMacParameters. @n
+ * It is assumed that each %Pkcs05PbMacParameters will have only a single form of encoding, for example ASN.1 DER.
*
* @since 2.1
*
- * @return A pointer to the ByteBuffer class that contains the output, @n
+ * @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
* else @c null if an error occurs.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
Tizen::Base::ByteBuffer* GetEncodedDataN(void) const;
/**
- * Get the reference to the AlgorithmIdentifier instance which identifies the underlying key derivation function.
- * It shall be an algorithm ID with an OID in the set PBES2-KDFs, which for this version of PKCS #5 shall consist of id-PBKDF2.
+ * Gets the reference to the AlgorithmIdentifier instance that identifies the underlying key derivation function. @n
+ * It will be an algorithm ID with an OID in the set PBES2-KDFs, which for this version of PKCS #5 will consist of ID-PBKDF2.
*
* @since 2.1
*
const AlgorithmIdentifier& GetKeyDerivationAlgorithm(void) const;
/**
- * This function implements GetMacAlgorithm API which returns the algorithm identifier which identifies the underlying
- * MAC algorithm. It shall be an OID like OID_HMAC_SHA1 or OID_HMAC_SHA2_224 etc.
+ * Gets the algorithm identifier that identifies the underlying
+ * MAC algorithm. @n It shall be an OID like OID_HMAC_SHA1 or OID_HMAC_SHA2_224, and so on.
*
* @since 2.1
*
- * @return A reference to AlgorithmIdentifier holding the underlying MAC algorithm.
+ * @return A reference to AlgorithmIdentifier holding the underlying MAC algorithm
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const AlgorithmIdentifier& GetMacAlgorithm(void) const;
/**
- * Get the AlgorithmParameters which identifies the underlying Parameters like PbKdf2,PbEs2,PbMac1.
- * For this class AlgorithmParameters will be of PbMac1 type.
+ * Gets the AlgorithmParameters that identifies the underlying Parameters such as PbKdf2, PbEs2, PbMac1. @n
+ * For this class %AlgorithmParameters will be of PbMac1 type.
*
* @since 2.1
*
- * @return A pointer to IAlgorithmParameters Containing the algorithm identifier of underlying pseudo random function.
+ * @return A pointer to IAlgorithmParameters containing the algorithm identifier of underlying pseudo random function
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual IAlgorithmParameters* CloneN(void) const;
*
* @since 2.1
*
- * @return PkcsAlgorithmParameterType holding enum value PKCS_ALGO_PARAM_TYPE_PKCS05_MAC for PBMAC Parameters.
+ * @return PkcsAlgorithmParameterType holding enum value @c PKCS_ALGO_PARAM_TYPE_PKCS05_MAC for PBMAC parameters
*/
virtual PkcsAlgorithmParameterType GetType(void) const;
/**
* @class Pkcs05Schemes
- * @brief This class implements the functionalities specified by the pkcs05 schemes like Key derivation function,
+ * @brief This class implements the functionalities specified by the pkcs05 schemes like key derivation function,
* encryption and signature schemes.
+ *
* @since 2.1
*
+ * The %Pkcs05Schemes class implements the functionalities specified by the pkcs05 schemes like key derivation function,
+ * encryption and signature schemes.
*/
class _OSP_EXPORT_ Pkcs05Schemes
virtual ~Pkcs05Schemes(void);
/**
- * Initializes the %Pkcs05Schemes with supplied input parameters values.
+ * Initializes this instance of %Pkcs05Schemes with the values of the specified input parameters.
*
* @since 2.1
*
- * @return An error code.
- * @param[in] password An instance of ByteBuffer , holding the password.
- * @param[in] derivedKeyLength A positive integer contains the length of derived key.@n
- * It is a variable length in PbEs2 based on underlying encryption operation.
+ * @return An error code
+ * @param[in] password An instance of Tizen::Base::ByteBuffer holding the password
+ * @param[in] derivedKeyLength A positive integer that contains the length of derived key @n
+ * It is a variable length in PbEs2 based on the underlying encryption operation.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& password, int derivedKeyLength);
/**
- * This API will generate the Password based derived key using PBKDF2 scheme.
+ * Generates the password based derived key using the PBKDF2 scheme. @n
* The length of the derived key is essentially unbounded. However, the maximum effective search space for
* the derived key may be limited by the structure of the underlying pseudo random function.
*
* @since 2.1
*
- * @return A pointer to ByteBuffer contains the derived key, @n
- * else @c null if an error occurs.
- * @param[in] params An instance of PbKdf2Parameters, containing Kdf2 parameter.
- * salt value, iteration count and key length.
+ * @return A pointer to Tizen::Base::ByteBuffer that contains the derived key, @n
+ * else @c null if an error occurs
+ * @param[in] params An instance of PbKdf2Parameters containing the Kdf2 parameter,
+ * salt value, iteration count, and key length
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
Tizen::Base::ByteBuffer* GenerateKeyKdf2N(const Pkcs05PbKdf2Parameters& params);
/**
- * This API implements EncryptionScheme2N API which combines the GenerateKeyKdf2N function and encrypts the
- * message M under a password P to produce a ciphertext C, by applying selected key derivation function KDF
+ * Encrypts the message M under a password P to produce a ciphertext C, by applying selected key derivation function KDF
* (which is GenerateKeyKdf2N) and selected underlying encryption scheme (which can be any block chiper).
*
* @since 2.1
*
- * @return Pointer to ByteBuffer contains the encrypted message, @n
- * else @c null if an error occurs.
- * @param[in] params An instance of PbEs2Parameters, parameter structure holding AlgorithmIdentifier for key derivation
- * function and AlgorithmIdentifier for underlying encryption scheme.
- * @param[in] message An instance of ByteBuffer, holding the plain text to encrypt.
+ * @return A pointer to Tizen::Base::ByteBuffer that contains the encrypted message, @n
+ * else @c null if an error occurs
+ * @param[in] params An instance of the PbEs2Parameters parameter structure holding AlgorithmIdentifier for key derivation
+ * function and AlgorithmIdentifier for underlying encryption scheme
+ * @param[in] message An instance of Tizen::Base::ByteBuffer holding the plain text to encrypt
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::ByteBuffer* EncryptionScheme2N(const Pkcs05PbEs2Parameters& params, const Tizen::Base::ByteBuffer& message);
/**
- * This API implements DecryptionScheme2N API which combines the GenerateKeyKdf2N function and decrypts the ciphertext C,
- * under a password P to recover message M , by applying selected key derivation function KDF(which is GenerateKeyKdf2N)
+ * Decrypts the ciphertext C, under a password P to recover message M , by applying selected key derivation function KDF(which is GenerateKeyKdf2N)
* and selected underlying decryption algorithm (which can be any block cipher).
*
* @since 2.1
*
- * @return Pointer to ByteBuffer contains the plain text message.
- * @param[in] params An instance of PbEs2Parameters, parameter structure holding AlgorithmIdentifier for key derivation
- * function and AlgorithmIdentifier for underlying encryption scheme.
- * @param[in] message An instance of ByteBuffer, holding the cipher text to decrypt.
+ * @return A pointer to Tizen::Base::ByteBuffer that contains the plain text message
+ * @param[in] params An instance of the PbEs2Parameters parameter structure holding AlgorithmIdentifier for key derivation
+ * function and AlgorithmIdentifier for underlying encryption scheme
+ * @param[in] message An instance of Tizen::Base::ByteBuffer holding the cipher text to decrypt
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::ByteBuffer* DecryptionScheme2N(const Pkcs05PbEs2Parameters& params, const Tizen::Base::ByteBuffer& message);
/**
- * This API implements GetPbHMacN API process a message M under a password P to generate a message authentication code T,
+ * Gets a message M under a password P to generate a message authentication code T,
* by applying selected key derivation function KDF(which is GenerateKeyKdf2N) and selected underlying message authentication scheme
- * (which can be any HMAC algorithm). GenerateMacN combines a password-based key derivation function, which shall be
+ * (which can be any HMAC algorithm). @n GenerateMacN combines a password-based key derivation function, which shall be
* GenerateKeyKdf2N for this version of PKCS #5, with an underlying message authentication scheme
* The key length and any other parameters for the underlying message authentication scheme
* depend on the scheme.
*
* @since 2.1
*
- * @return Pointer to ByteBuffer containing the HMAC generated from message, @n
- * else @c null if an error occurs.
- * @param[in] params An instance of bMacParameters, parameter structure holding AlgorithmIdentifier for key derivation
- * function and AlgorithmIdentifier for underlying encryption scheme.
- * @param[in] message An instance of ByteBuffer, holding the message for which MAC needs to be generated.
+ * @return A pointer to Tizen::Base::ByteBuffer containing the HMAC generated from message, @n
+ * else @c null if an error occurs
+ * @param[in] params An instance of the PbMacParameters parameter structure holding AlgorithmIdentifier for key derivation
+ * function and AlgorithmIdentifier for underlying encryption scheme
+ * @param[in] message An instance of Tizen::Base::ByteBuffer holding the message for which MAC needs to generate
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::ByteBuffer* GetPbHMacN(const Pkcs05PbMacParameters& params, const Tizen::Base::ByteBuffer& message);
/**
- * This API implements VerifyMac API which processes a message M under a password P to verify a message authentication code T,
+ * Verifies a message M under a password P to verify a message authentication code T,
* by applying a selected key derivation function KDF2 and a selected underlying message authentication scheme combines a
* password-based key derivation function, which shall be GenerateKeyKdf2N for this version of PKCS #5, with an underlying
- * message authentication scheme (which can be any SHA-1 or any SHA-2 algorithm). The key length and any other parameters
+ * message authentication scheme (which can be any SHA-1 or any SHA-2 algorithm). @n The key length and any other parameters
* for the underlying message authentication scheme depend on the scheme.
*
* @since 2.1
*
* @return An error code
- * @param[in] params An instance of PbMacParameters, parameter structure holding AlgorithmIdentifier for key derivation
- * function and AlgorithmIdentifier for underlying encryption scheme.
- * @param[in] message An instance of ByteBuffer, holding the message M.
- * @param[in] mac An instance of ByteBuffer, holding the HMAC mac that needs to be verified against message.
+ * @param[in] params An instance of the PbMacParameters parameter structure holding AlgorithmIdentifier for key derivation
+ * function and AlgorithmIdentifier for underlying encryption scheme
+ * @param[in] message An instance of Tizen::Base::ByteBuffer holding the message M
+ * @param[in] mac An instance of Tizen::Base::ByteBuffer holding the HMAC mac that needs to verify against the message
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
/**
* @class Pkcs08Attribute
- * @brief This class implements the functionalities specified by the Pkcs08Attribute class. An Attribute object consists
- * of an attribute type (specified by an object identifier) and one or more attribute values. It acts as a
- * container for adding, inserting, removing, encoding X.509 AttributeValue.
+ * @brief This class implements the functionalities specified by the %Pkcs08Attribute class.
+ *
* @since 2.1
*
+ * The %Pkcs08Attribute class implements the functionalities specified by the %Pkcs08Attribute class. An Attribute object consists
+ * of an attribute type (specified by an object identifier) and one or more attribute values. It acts as a
+ * container for adding, inserting, removing, and encoding X.509 AttributeValue.
+ *
*/
class _OSP_EXPORT_ Pkcs08Attribute
virtual ~Pkcs08Attribute(void);
/**
- * Intializes this instance of %Pkcs08Attribute with the Bytebuffer which contain X.509 Attribute @n
- * structure in ASN.1 DER format. @n
+ * Intializes this instance of %Pkcs08Attribute with the Tizen::Base::Bytebuffer that contains the X.509 attribute @n
+ * structure in ASN.1 DER format.
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData DER encoded Bytebuffer of X.509 Attribute structure.
+ * @param[in] encodedData The DER encoded Bytebuffer containing the X.509 attribute structure
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& encodedData);
/**
- * Intializes this instance of %Pkcs08Attribute with specified attribute type.
+ * Intializes this instance of %Pkcs08Attribute with the specified attribute type.
*
* @since 2.1
*
* @return An error code
- * @param[in] attributeType This parameter specifies object Identifier of particular x.509 attribute type. Object IDs @n
- * (e.g. oid for name is 2.5.4.41)are defined by standard bodies for attribute.
+ * @param[in] attributeType The object identifier of a particular X.509 attribute type @n Object IDs (for example, oid for name is 2.5.4.41) are defined by standard attribute bodies.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::String& attributeType);
/**
- * Get the attribute type.
- * This function implements GetAttributeType API which returns the Attribute type of this attribute instance.
+ * Gets the attribute type. @n
+ * The %GetAttributeType() method implements GetAttributeType that returns the attribute type of this attribute instance.
*
* @since 2.1
*
- * @return Containing the Object ID of Attribute Type in string format like 2.5.4.41
+ * @return Containing the object ID of attribute type in string format like 2.5.4.41
*
*/
Tizen::Base::String GetAttributeType(void) const;
/**
- * This function adds attribute value in the attribute value list.
+ * Adds an attribute value in the attribute value list.
*
* @since 2.1
*
* @return An error code
- * @param[in] attributeValue An instance of Pkcs08AttributeValue to add an attribute in the list.
+ * @param[in] attributeValue An instance of Pkcs08AttributeValue to add an attribute in the list
*/
result AddAttributeValue(const Pkcs08AttributeValue& attributeValue);
/**
- * This function remove attribute value in the attribute value list.
+ * Removes an attribute value from the attribute value list.
*
* @since 2.1
*
* @return An error code
- * @param[in] attributeValue An instance of Pkcs08AttributeValue to remove an attribute in the list.
+ * @param[in] attributeValue An instance of Pkcs08AttributeValue to remove an attribute from the list
*/
result RemoveAttributeValue(const Pkcs08AttributeValue& attributeValue);
/**
- * This function returns the array list containing the attribute values of type Pkcs08AttributeValue.
+ * Returns an array list containing the attribute values of type Pkcs08AttributeValue.
*
* @since 2.1
*
- * @return A reference to an ArrayList containing the list of Attribute values.
+ * @return A reference to an ArrayList containing the list of attribute values
*/
const Tizen::Base::Collection::ArrayList& GetAttributeValues(void) const;
/**
- * Gets the encoded form of the Pkcs08Attribute.
- * It is assumed that each Pkcs08Attribute will have only a single form of encoding example ASN.1 DER.
+ * Gets the encoded form of Pkcs08Attribute.
+ * It is assumed that each %Pkcs08Attribute will have only a single form of encoding, for example ASN.1 DER.
*
* @since 2.1
*
- * @return A pointer to the ByteBuffer class that contains the output, @n
+ * @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
* else @c null if an error occurs
*
* @exception E_SUCCESS The method is successful.
/**
* @class Pkcs08AttributeValue
- * @brief This class implements the functionalities specified by the Pkcs08AttributeValue class.
- * @brief Pkcs08AttributeValue object will consist of the value of an attribute and the tag value.
+ * @brief This class implements the functionalities specified by the %Pkcs08AttributeValue class.
+ *
* @since 2.1
*
+ * The %Pkcs08AttributeValue class implements the functionalities specified by the %Pkcs08AttributeValue class.
+ * The %Pkcs08AttributeValue object consists of an attribute value and a tag value.
+ *
*/
class _OSP_EXPORT_ Pkcs08AttributeValue
: public Tizen::Base::Object
virtual ~Pkcs08AttributeValue(void);
/**
- * Intializes this instance of %Pkcs08AttributeValue with the Bytebuffer which contain AttributeValue @n
- * (contain tag i.e. Ans1_Type and the value)
+ * Intializes this instance of %Pkcs08AttributeValue with the Tizen::Base::Bytebuffer that contains the AttributeValue @n
+ * (contain tag, that is, Ans1_Type and the value).
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData DER encoded Bytebuffer of AttrributeValue.
+ * @param[in] encodedData The DER encoded Tizen::Base::Bytebuffer of AttributeValue
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& encodedData);
/**
- * Intializes this instance of %Pkcs08AttributeValue with specified parameters.
- * This API implements the Construct API which initializes the attribute value instance based on passed byte buffer.
+ * Intializes this instance of %Pkcs08AttributeValue with the specified parameters. @n
+ * The %Construct() method initializes the attribute value instance based on the byte buffer passed.
*
* @since 2.1
*
* @return An error code
- * @param[in] value An instance of ByteBuffer, holding raw value. @n
- * @param[in] tag Tag holding the tag type. This tag number is assigned by ASN1 standards for @n
+ * @param[in] value An instance of Tizen::Base::ByteBuffer holding raw value
+ * @param[in] tag A tag holding the tag type @n This tag number is assigned by ASN1 standards for @n
* basic data types.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& value, const Pkcs08TagValue tag);
/**
- * Get the reference to the ByteBuffer contains the attribute value.
+ * Gets a reference to Tizen::Base::ByteBuffer that contains the attribute value.
*
* @since 2.1
*
- * @return A reference to ByteBuffer,containing raw value.
+ * @return A reference to Tizen::Base::ByteBuffer containing raw value
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const Tizen::Base::ByteBuffer& GetValue(void) const;
/**
- * Get the tag value of an attribute.
- * This tag number is assigned by ASN1 standards for basic data types..
+ * Gets the tag value of an attribute. @n
+ * This tag number is assigned by ASN1 standards for basic data types.
*
* @since 2.1
*
- * @return Tag value that is assigned by ASN1 standards for basic data types.
+ * @return The tag value that is assigned by ASN1 standards for basic data types
*/
Pkcs08TagValue GetTag(void) const;
/**
- * Gets the pointer to the ByteBuffer that contains the attribute value in encoded format.
- * It is assumed that each Pkcs08Attribute will have only a single form of encoding example ASN.1 DER.
+ * Gets a pointer to Tizen::Base::ByteBuffer that contains the attribute value in encoded format. @n
+ * It is assumed that each Pkcs08Attribute will have only a single form of encoding, for example, ASN.1 DER.
*
* @since 2.1
*
- * @return A pointer to the ByteBuffer class that contains the output, @n
- * else @c null if an error occurs.
+ * @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
* @class Pkcs08EncryptedPrivateKeyInfo
- * @brief This class implements to encrypt a private key.An Encrypted private key structure consist
- * of an encryption algorithm and the encrypted Pkcs08PrivateKeyInfo.
+ * @brief This class provides methods to encrypt a private key.
+ *
+ * @since 2.1
*
- * It is defined in ASN.1 as:
+ * The %Pkcs08EncryptedPrivateKeyInfo class provides methods to encrypt a private key. An encrypted private key structure consist
+ * of an encryption algorithm and the encrypted Pkcs08PrivateKeyInfo.
*
+ * This is defined in ASN.1 as demonstrated in the following code:
+ * @code
* EncryptedPrivateKeyInfo ::= SEQUENCE {
* encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
* encryptedData EncryptedData
* }
- * @since 2.1
- *
+ * @endcode
*/
class _OSP_EXPORT_ Pkcs08EncryptedPrivateKeyInfo
virtual ~Pkcs08EncryptedPrivateKeyInfo(void);
/**
- * Initializes this instance of %Pkcs08EncryptedPrivateKeyInfo with the encoded Bytebuffer which contain @n
- * EncryptedPrivateKeyInfo structure(EncryptedPrivateKeyInfo) in ASN.1 DER format.
+ * Initializes this instance of %Pkcs08EncryptedPrivateKeyInfo with the encoded Tizen::Base::Bytebuffer that contains @n
+ * the EncryptedPrivateKeyInfo structure(EncryptedPrivateKeyInfo) in ASN.1 DER format.
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData DER encoded Bytebuffer contains Pkcs08 EncryptedPrivateKeyInfo structure.
+ * @param[in] encodedData The DER encoded Tizen::Base::Bytebuffer that contains the Pkcs08 EncryptedPrivateKeyInfo structure
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& encodedData);
/**
- * Initializes the %Pkcs08EncryptedPrivateKeyInfo with supplied input parameters values.
+ * Initializes this instance of %Pkcs08EncryptedPrivateKeyInfo with the values of the specified input parameters.
*
* @since 2.1
*
* @return An error code
- * @param[in] algorithmId An instance of AlgorithmIdentifier.
- * @param[in] encryptedData Encrypted private key.
+ * @param[in] algorithmId An instance of AlgorithmIdentifier
+ * @param[in] encryptedData An encrypted private key
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*/
result Construct(const AlgorithmIdentifier& algorithmId, const Tizen::Base::ByteBuffer& encryptedData);
/**
- * Initializes the %Pkcs08EncryptedPrivateKeyInfo with supplied input parameters values.
+ * Initializes this instance of %Pkcs08EncryptedPrivateKeyInfo with the values of the specified input parameters.
*
* @since 2.1
*
* @return An error code
- * @param[in] algorithmId An instance of AlgorithmIdentifier which identifies secret key algorithm.
- * @param[in] key Key for encrypting privateKeyInfo.
- * @param[in] encodedPrivateKeyInfo An instance of encryptedPrivateKeyInfo.
+ * @param[in] algorithmId An instance of AlgorithmIdentifier that identifies the secret key algorithm
+ * @param[in] key The key for encrypting privateKeyInfo
+ * @param[in] encodedPrivateKeyInfo An instance of Tizen::Base::ByteBuffer containing encoded privateKeyInfo
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*
*/
result Construct(const AlgorithmIdentifier& algorithmId, const Tizen::Base::ByteBuffer& key, const Tizen::Base::ByteBuffer& encodedPrivateKeyInfo);
/**
- * Gets the reference to AlgorithmIdentifier which identifies the encryption algorithm under which private key is encrypted.
+ * Gets a reference to AlgorithmIdentifier that identifies the encryption algorithm under which the private key is encrypted.
*
* @since 2.1
*
- * @return A reference to AlgorithmIdentifier Contains the algorithm identifier of Pkcs08EncryptedPrivateKeyInfo object.
+ * @return A reference to AlgorithmIdentifier that contains the algorithm identifier of %Pkcs08EncryptedPrivateKeyInfo object
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const AlgorithmIdentifier& GetAlgorithm(void) const;
/**
- * Gets the pointer to the ByteBuffer which contains encrypted private key.
+ * Gets a pointer to Tizen::Base::ByteBuffer that contains the encrypted private key.
*
* @since 2.1
*
- * @return A pointer to ByteBuffer class contains the private key of Pkcs08EncryptedPrivateKeyInfo object, @n
- * else @c null if an error occurs.
+ * @return A pointer to Tizen::Base::ByteBuffer class that contains the private key of the %Pkcs08EncryptedPrivateKeyInfo object, @n
+ * else @c null if an error occurs
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::ByteBuffer* GetEncryptedDataN(void) const;
/**
- * This API will provide the implementation of DecryptN to decrypt the Pkcs08EncryptedPrivateKeyInfo Object
- * using the Key or Password.
+ * Decrypts the %Pkcs08EncryptedPrivateKeyInfo object using a key or password.
*
* @since 2.1
*
- * @return A pointer to ByteBuffer Contains the decrypted private key of Pkcs08EncryptedPrivateKeyInfo object, @n
- * else @c null if an error occurs.
- * @param[in] key An instance of ByteBuffer, holding key to decrypt private key using particular @n
- * secret key algorithm.
+ * @return A pointer to Tizen::Base::ByteBuffer that contains the decrypted private key of the %Pkcs08EncryptedPrivateKeyInfo object, @n
+ * else @c null if an error occurs
+ * @param[in] key An instance of Tizen::Base::ByteBuffer holding a key to decrypt the private key using a particular @n
+ * secret key algorithm
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*
* @since 2.1
*
- * @return A pointer to the ByteBuffer class that contains the output, @n
- * else @c null if an error occurs.
+ * @return A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
* @class Pkcs08PrivateKeyInfo
- * @brief This class implements the functionalities specified by the Pkcs08 PrivateKeyInfo class.
- * This class represents the structure of Pkcs08 Private Key Info.
+ * @brief This class implements the functionalities specified by the %Pkcs08PrivateKeyInfo class.
*
- * It is defined in ASN.1 as:
+ * @since 2.1
+ *
+ * The %Pkcs08PrivateKeyInfo class implements the functionalities specified by the %Pkcs08PrivateKeyInfo class.
+ * This class represents the structure of Pkcs08 Private Key Info.
*
+ * This is defined in ASN.1 as demonstrated in the following code:
+ * @code
* PrivateKeyInfo ::= SEQUENCE {
* version Version,
* privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
* privateKey PrivateKey,
* attributes [0] Attributes OPTIONAL }
- * @since 2.1
- *
+ * @endcode
*/
class _OSP_EXPORT_ Pkcs08PrivateKeyInfo
virtual ~Pkcs08PrivateKeyInfo(void);
/**
- * Initializes this instance of %Pkcs08PrivateKeyInfo with the encoded byte buffer which contain @n
+ * Initializes this instance of %Pkcs08PrivateKeyInfo with the encoded byte buffer that contains @n
* pkcs08 private key info structure(PrivateKeyInfo) in ASN.1 DER format. @n
- * It parses this encoded buffer and extracts the appropiate values of private key, its algorithm id and attributes.
+ * It parses this encoded buffer and extracts the appropiate values of private key, its algorithm ID, and attributes.
*
* @since 2.1
*
* @return An error code
- * @param[in] encodedData The instance of Bytebuffer, containing DER encoded PrivateKeyInfo structure.
+ * @param[in] encodedData An instance of Tizen::Base::Bytebuffer containing DER encoded PrivateKeyInfo structure
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& encodedData);
/**
- * Initializes the %Pkcs08PrivateKeyInfo with supplied input parameters values.
+ * Initializes this instance of %Pkcs08PrivateKeyInfo with the values of the specified input parameters.
*
* @since 2.1
*
* @return An error code.
- * @param[in] keyAlgorithmId An instance of AlgorithIdentifier, holding algorithm identifier of private key algorithm.
- * @param[in] privateKey An instance of ByteBuffer holding privatekey.
+ * @param[in] keyAlgorithmId An instance of AlgorithmIdentifier holding algorithm identifier of the private key algorithm
+ * @param[in] privateKey An instance of Tizen::Base::ByteBuffer holding private key
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*/
result Construct(const AlgorithmIdentifier& keyAlgorithmId, const Tizen::Base::ByteBuffer& privateKey);
/**
- * This function will provide the implementation of GetVersion API to get the private key syntax version number of PrivateKeyInfo object @n
- * that is used for storing private key and its related information and default value of this version is 0.
+ * Gets the private key syntax version number of PrivateKeyInfo object @n
+ * that is used for storing private key and its related information and default value of this version is @c 0.
*
* @since 2.1
*
- * @return An integer valuse contains the version.
+ * @return An integer value that contains the version
*
*/
int GetVersion(void) const;
/**
- * Gets the reference to AlgorithmIdentifier which identifies the secret key algorithm.
+ * Gets the reference to AlgorithmIdentifier that identifies the secret key algorithm.
*
* @since 2.1
*
- * @return A reference to AlgorithmIdentifier Contains the algorithm identifier of Pkcs08PrivateKeyInfo object.
+ * @return A reference to AlgorithmIdentifier that contains the algorithm identifier of the %Pkcs08PrivateKeyInfo object
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const AlgorithmIdentifier& GetPrivateKeyAlgorithm(void) const;
/**
- * This function will provide the implementation of GetPrivateKeyN API to get the reference to ByteBuffer which contains
- * the private key in binary format.
+ * Gets the reference to Tizen::Base::ByteBuffer that contains the private key in binary format.
*
* @since 2.1
*
- * @return A reference to ByteBuffer Contains the private key of Pkcs08PrivateKeyInfo object.
+ * @return A reference to Tizen::Base::ByteBuffer that contains the private key of the %Pkcs08PrivateKeyInfo object
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const Tizen::Base::ByteBuffer& GetPrivateKey(void) const;
/**
- * This API will provide the implementation of GetAttributes API to get the Attributes of type Pkcs08Attribute which are extended @n
- * information of private key in context.
+ * Gets the attributes of the type Pkcs08Attribute that are extended information of the private key in context.
*
* @since 2.1
*
- * @return Reference to array list, contains the list of attributes of type Pkcs08Attribute.
+ * @return A reference to Tizen::Base::Collection::ArrayList that contains the list of attributes of type Pkcs08Attribute
*/
const Tizen::Base::Collection::ArrayList& GetAttributes(void) const;
/**
- * This function adds Attributes in private key info i.e. extended information of private key in context.
+ * Adds the attributes in private key information that is extended information of the private key in context.
*
* @since 2.1
*
* @return An error code
- * @param[in] attributes An instance of Pkcs08Attribute class..
+ * @param[in] attributes An instance of Pkcs08Attribute
*/
result AddAttribute(const Pkcs08Attribute& attributes);
/**
- * This function remove Attribute in private key info i.e. extended information of private key in context.
+ * Removes the attribute in private key information that is extended information of the private key in context.
*
* @since 2.1
*
* @return An error code
- * @param[in] attributes An instance of Pkcs08Attribute class.
+ * @param[in] attributes An instance of Pkcs08Attribute
*/
result RemoveAttribute(const Pkcs08Attribute& attributes);
/**
- * Gets the DER encoded Pkcs08PrivateKeyInfo structure.
+ * Gets the DER encoded %Pkcs08PrivateKeyInfo structure.
*
* @since 2.1
*
- * @return Pointer to ByteBuffer Contains the DER encoded private key info.
+ * @return A pointer to Tizen::Base::ByteBuffer that contains the DER encoded private key information
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
* @file FSecPkcsRc2CbcParameters.h
- * @brief This is the header file for the %PkcsRc2CbcParametersr class.
+ * @brief This is the header file for the %Rc2CbcParameters class.
*
- * This header file contains the declarations of the %PkcsRc2CbcParameters class.
+ * This header file contains the declarations of the %Rc2CbcParameters class.
*/
#ifndef _FSEC_PKCS_RC2_CBC_PARAMETERS_H_
/**
* @class Rc2CbcParameters
* @brief This class implements the functionalities specified by the Rc2 Cbc mode parameter.
- * @brief This class implements the functionalities specified by the Rc2 Cbc mode parameter.
+ *
+ * @since 2.1
+ *
+ * The %Rc2CbcParameters class implements the functionalities specified by the Rc2 Cbc mode parameter.
* This class represents the Rc2 cbc mode parameter for symmetric ciphers RC2.
* ASN.1 format for RC2-CBC-Parameter ::= SEQUENCE {
* rc2ParameterVersion INTEGER OPTIONAL,
* iv OCTET STRING (SIZE(8)) }
*
- * @since 2.1
- *
*/
class _OSP_EXPORT_ Rc2CbcParameters
*
* @since 2.1
*/
- virtual ~Rc2CbcParameters(void);
+ virtual ~Rc2CbcParameters();
/**
- * Initializes this instance of %Rc2CbcParameters with supplied input parameters values.
+ * Initializes this instance of %Rc2CbcParameters with the values of the specified input parameters.
*
* @since 2.1
*
* @return An error code
- * @param[in] initialVector An instance of ByteBuffer containing the initial vector.
- * @param[in] version An integer value defines the rc2 cbc parameter version.
- * As per Pkcs 5 standard, possible value can be 160,120,58 or any value
+ * @param[in] initialVector An instance of Tizen::Base::ByteBuffer containing the initial vector
+ * @param[in] version An integer value that defines the rc2 cbc parameter version @n
+ * As per Pkcs 5 standard, possible values can be 160,120,58, or any value
* greater than or equal to 256.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*/
result Construct(const Tizen::Base::ByteBuffer& initialVector, int version = 0);
/**
- * Get the copy of this instance.
+ * Gets a copy of this instance.
*
* @since 2.1
*
- * @return A pointer to IAlgorithmParameters, containing the copy of this instance.
+ * @return A pointer to IAlgorithmParameters, containing a copy of this instance
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
virtual IAlgorithmParameters* CloneN(void) const;
/**
- * Get the algorithm parameter type enum value for Rc2CbcParameters.
+ * Gets the algorithm parameter type enum value for %Rc2CbcParameters.
*
* @since 2.1
*
- * @return PkcsAlgorithmParameterType Enum value containing the PKCS_ALGO_PARAM_TYPE_RC2 value for Rc2CbcParameters parameter.
+ * @return An enum value containing the @c PKCS_ALGO_PARAM_TYPE_RC2 value for %Rc2CbcParameters parameter
*
*/
virtual PkcsAlgorithmParameterType GetType(void) const;
virtual int GetHashCode(void) const;
/**
- * Get the rc2 cbc parameter version value.
+ * Gets the rc2 cbc parameter version value.
*
* @since 2.1
*
- * @return An integer value that contains the rc2 cbc parameter version.
+ * @return An integer value that contains the rc2 cbc parameter version
*
*/
int GetVersion(void) const;
/**
- * Get the instance of byte buffer that contains the Initial Vector value.
+ * Gets an instance of Tizen::Base::ByteBuffer that contains the initial vector value.
*
* @since 2.1
*
- * @return A reference to ByteBuffer , containing the initial vector data.
+ * @return A reference to Tizen::Base::ByteBuffer containing the initial vector data
*
*/
const Tizen::Base::ByteBuffer& GetInitialVector(void) const;
/**
- * Gets the encoded form of the Rc2CbcParameter. @n
- * It is assumed that each Rc2CbcParameter type will have only a single form of encoding that is DER encoding.
+ * Gets the encoded form of %Rc2CbcParameters. @n
+ * It is assumed that each %Rc2CbcParameters type will have only a single form of encoding that is DER encoding.
*
* @since 2.1
*
- * @return Pointer to the DER encoded ByteBuffer, @n
- * else @c null if an error occurs.
+ * @return A pointer to the DER encoded Tizen::Base::ByteBuffer, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
* @file FSecPkcsTypes.h
- * @brief This header file contains the declarations of AlgorithmIdentifier and AttributeType OID List.
- * @brief This header file also contains the enum declaration of AlgorithmParameterType and Pkcs08TagValue.
+ * @brief This is the header file for the declarations of the %PkcsAlgorithmParameterType and %Pkcs08TagValue enumerators and the AttributeType OID List.
*
- * This header file contains the declarations of the AlgorithmIdentifier and AttributeType OID List.
- * It also contains the enum declaration of AlgorithmParameterType and Pkcs08TagValue.
+ * This header file contains the declarations of the %PkcsAlgorithmParameterType and %Pkcs08TagValue enumerators and the AttributeType OID List.
*/
#ifndef _FSEC_PKCS_TYPES_H_
/**
* @enum PkcsAlgorithmParameterType
*
- * Defines the type of parameters.
+ * Defines the types of parameters.
*
* @since 2.1
*/
enum PkcsAlgorithmParameterType
{
- PKCS_ALGO_PARAM_TYPE_IV, /**< parameter type is initial vector */
- PKCS_ALGO_PARAM_TYPE_PKCS05_PBES02, /**< parameter type is pkcs5 password based encryption scheme2 */
- PKCS_ALGO_PARAM_TYPE_PKCS05_KDF02, /**< parameter type is pkcs5 password based key derivation scheme2 */
- PKCS_ALGO_PARAM_TYPE_PKCS05_MAC, /**< parameter type is pkcs5 message authentication scheme */
- PKCS_ALGO_PARAM_TYPE_RC2, /**< parameter type is rc2 cbc */
- PKCS_ALGO_PARAM_TYPE_UNKOWN = 0xFFFFFFFF /**< Unknown parameter type */
+ PKCS_ALGO_PARAM_TYPE_IV, /**< The parameter type is initial vector */
+ PKCS_ALGO_PARAM_TYPE_PKCS05_PBES02, /**< The parameter type is pkcs5 password based encryption scheme2 */
+ PKCS_ALGO_PARAM_TYPE_PKCS05_KDF02, /**< The parameter type is pkcs5 password based key derivation scheme2 */
+ PKCS_ALGO_PARAM_TYPE_PKCS05_MAC, /**< The parameter type is pkcs5 message authentication scheme */
+ PKCS_ALGO_PARAM_TYPE_RC2, /**< The parameter type is rc2 cbc */
+ PKCS_ALGO_PARAM_TYPE_UNKOWN = 0xFFFFFFFF /**< An unknown parameter type */
}; //PkcsAlgorithmParameterType;
/**
*/
enum Pkcs08TagValue
{
- PKCS08_TAG_RESERVED = 0, /**< reserved for use by the encoding rules. */
- PKCS08_TAG_BOOLEAN = 1, /**< an arbitrary bool value. */
- PKCS08_TAG_INTEGER = 2, /**< an arbitrary integer value. */
- PKCS08_TAG_BITSTRING = 3, /**< an arbitrary string of bits. */
- PKCS08_TAG_OCTETSTRING = 4, /**< an arbitrary string of octets. */
- PKCS08_TAG_NULL = 5, /**< a null value. */
- PKCS08_TAG_OBJECT_ID = 6, /**< object identifier. */
- PKCS08_TAG_OBJECT_DES = 7, /**< object descriptor providing a brief description of an object. */
- PKCS08_TAG_EXTERNAL = 8, /**< an arbitrary external value. */
- PKCS08_TAG_REAL = 9, /**< an arbitrary real value. */
- PKCS08_TAG_ENUM = 10, /**< an enumerated value. */
- PKCS08_TAG_EMBEDDED = 11, /**< an embedded value. */
- PKCS08_TAG_UTF8STRING = 12, /**< an arbitrary utf8 string. */
- PKCS08_TAG_REL_OBJ_ID = 13, /**< relative object id. */
- PKCS08_TAG_SEQUENCE = 16, /**< an ordered collection of one or more types. */
- PKCS08_TAG_SET = 17, /**< an unordered collection of one or more types. */
- PKCS08_TAG_CHAR_STRING = 18, /**< numeric string. */
- PKCS08_TAG_PRINTABLE_STRING = 19, /**< an arbitrary string of printable characters. */
- PKCS08_TAG_TELETEXT_STRING = 20, /**< teletext string, T61 string. */
- PKCS08_TAG_VIDEOTEXT_STRING = 21, /**< videotex string. */
- PKCS08_TAG_IA5STRING = 22, /**< an arbitrary string of IA5 (ASCII) characters.*/
- PKCS08_TAG_UTC_TIME = 23, /**< a coordinated universal time" or Greenwich Mean Time (GMT) value. */
- PKCS08_TAG_GEN_TIME = 24, /**< generalized time. */
- PKCS08_TAG_GRAPHICS_STRING = 25, /**< graphic string. */
- PKCS08_TAG_VISIBLE_STRING = 26, /**< visible string, ISO64 string. */
- PKCS08_TAG_GENERAL_STRING = 27, /**< general string. */
- PKCS08_TAG_UNIVERSAL_STRING = 28, /**< universal string. */
- PKCS08_TAG_CHARACTER_STRING = 29, /**< an arbitrary character string. */
- PKCS08_TAG_BMP_STRING = 30, /**< bmp string. */
- PKCS08_TAG_UNKNOWN = -1 /**< unknown tag type. */
+ PKCS08_TAG_RESERVED = 0, /**< Reserved for use by the encoding rules */
+ PKCS08_TAG_BOOLEAN = 1, /**< An arbitrary bool value */
+ PKCS08_TAG_INTEGER = 2, /**< An arbitrary integer value */
+ PKCS08_TAG_BITSTRING = 3, /**< An arbitrary string of bits */
+ PKCS08_TAG_OCTETSTRING = 4, /**< An arbitrary string of octets */
+ PKCS08_TAG_NULL = 5, /**< A null value */
+ PKCS08_TAG_OBJECT_ID = 6, /**< An object identifier */
+ PKCS08_TAG_OBJECT_DES = 7, /**< An object descriptor providing a brief description of an object */
+ PKCS08_TAG_EXTERNAL = 8, /**< An arbitrary external value */
+ PKCS08_TAG_REAL = 9, /**< An arbitrary real value */
+ PKCS08_TAG_ENUM = 10, /**< An enumerated value */
+ PKCS08_TAG_EMBEDDED = 11, /**< An embedded value */
+ PKCS08_TAG_UTF8STRING = 12, /**< An arbitrary utf8 string */
+ PKCS08_TAG_REL_OBJ_ID = 13, /**< A relative object ID */
+ PKCS08_TAG_SEQUENCE = 16, /**< An ordered collection of one or more types */
+ PKCS08_TAG_SET = 17, /**< An unordered collection of one or more types */
+ PKCS08_TAG_CHAR_STRING = 18, /**< A numeric string */
+ PKCS08_TAG_PRINTABLE_STRING = 19, /**< An arbitrary string of printable characters */
+ PKCS08_TAG_TELETEXT_STRING = 20, /**< A teletext string, T61 string */
+ PKCS08_TAG_VIDEOTEXT_STRING = 21, /**< A videotext string */
+ PKCS08_TAG_IA5STRING = 22, /**< An arbitrary string of IA5 (ASCII) characters */
+ PKCS08_TAG_UTC_TIME = 23, /**< A coordinated universal time or Greenwich Mean Time (GMT) value */
+ PKCS08_TAG_GEN_TIME = 24, /**< A generalized time */
+ PKCS08_TAG_GRAPHICS_STRING = 25, /**< A graphic string */
+ PKCS08_TAG_VISIBLE_STRING = 26, /**< A visible string, ISO64 string */
+ PKCS08_TAG_GENERAL_STRING = 27, /**< A general string */
+ PKCS08_TAG_UNIVERSAL_STRING = 28, /**< A universal string */
+ PKCS08_TAG_CHARACTER_STRING = 29, /**< An arbitrary character string */
+ PKCS08_TAG_BMP_STRING = 30, /**< A bmp string */
+ PKCS08_TAG_UNKNOWN = -1 /**< An unknown tag type */
}; // Pkcs08TagValue;
/*
-- Basic object identifiers in Pkcs05 and Pkcs08
*/
-_OSP_EXPORT_ extern const wchar_t OID_PKCS_05[]; /**< object identifier for pkcs05. */
-_OSP_EXPORT_ extern const wchar_t OID_PBKDF2[]; /**< object identifier for password based key derivation function scheme2. */
-_OSP_EXPORT_ extern const wchar_t OID_PBES2[]; /**< object identifier for password based encryption scheme2. */
-_OSP_EXPORT_ extern const wchar_t OID_PBMAC1[]; /**< object identifier for password based message authetication scheme1. */
-_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA1[]; /**< object identifier for hmac-sha1. */
-_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_224[]; /**< object identifier for hmac-sha224. */
-_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_256[]; /**< object identifier for hmac-sha256. */
-_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_384[]; /**< object identifier for hmac-sha384. */
-_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_512[]; /**< object identifier for hmac-sha512. */
-_OSP_EXPORT_ extern const wchar_t OID_DES_CBC[]; /**< object identifier for des-cbc mode. */
-_OSP_EXPORT_ extern const wchar_t OID_DES_CBC_EDE3[]; /**< object identifier for des-cbc-ede3 mode. */
-_OSP_EXPORT_ extern const wchar_t OID_AES_128_CBC[]; /**< object identifier for aes-128-cbc mode. */
-_OSP_EXPORT_ extern const wchar_t OID_AES_192_CBC[]; /**< object identifier for aes-192-cbc mode. */
-_OSP_EXPORT_ extern const wchar_t OID_AES_256_CBC[]; /**< object identifier for aes-256-cbc mode. */
-_OSP_EXPORT_ extern const wchar_t OID_RC2_CBC[]; /**< object identifier for rc2-cbc mode. */
-_OSP_EXPORT_ extern const wchar_t OID_PKCS_08[]; /**< object identifier for pkcs08. */
-_OSP_EXPORT_ extern const wchar_t OID_RSA_ENCRYPTION[]; /**< object identifier for rsa encryption scheme. */
+_OSP_EXPORT_ extern const wchar_t OID_PKCS_05[]; /**< An object identifier for pkcs05 */
+_OSP_EXPORT_ extern const wchar_t OID_PBKDF2[]; /**< An object identifier for password based key derivation function scheme2 */
+_OSP_EXPORT_ extern const wchar_t OID_PBES2[]; /**< An object identifier for password based encryption scheme2 */
+_OSP_EXPORT_ extern const wchar_t OID_PBMAC1[]; /**< An object identifier for password based message authetication scheme1 */
+_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA1[]; /**< An object identifier for hmac-sha1 */
+_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_224[]; /**< An object identifier for hmac-sha224 */
+_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_256[]; /**< An object identifier for hmac-sha256 */
+_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_384[]; /**< An object identifier for hmac-sha384 */
+_OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_512[]; /**< An object identifier for hmac-sha512 */
+_OSP_EXPORT_ extern const wchar_t OID_DES_CBC[]; /**< An object identifier for des-cbc mode */
+_OSP_EXPORT_ extern const wchar_t OID_DES_CBC_EDE3[]; /**< An object identifier for des-cbc-ede3 mode */
+_OSP_EXPORT_ extern const wchar_t OID_AES_128_CBC[]; /**< An object identifier for aes-128-cbc mode */
+_OSP_EXPORT_ extern const wchar_t OID_AES_192_CBC[]; /**< An object identifier for aes-192-cbc mode */
+_OSP_EXPORT_ extern const wchar_t OID_AES_256_CBC[]; /**< An object identifier for aes-256-cbc mode */
+_OSP_EXPORT_ extern const wchar_t OID_RC2_CBC[]; /**< An object identifier for rc2-cbc mode */
+_OSP_EXPORT_ extern const wchar_t OID_PKCS_08[]; /**< An object identifier for pkcs08 */
+_OSP_EXPORT_ extern const wchar_t OID_RSA_ENCRYPTION[]; /**< An object identifier for RSA encryption scheme */
/*
/**
* @enum RsaKeyFormat
*
- * Defines the type of rsa key format.
+ * Defines the types of rsa key format.
*
* @since 2.1
*/
enum RsaKeyFormat
{
- RSA_KEY_FORMAT_PKCS01_PRIVATE_KEY = 0, /**< % rsa key format is pkcs1 private key. */
- RSA_KEY_FORMAT_PKCS01_PUBLIC_KEY = 1, /**< % rsa key format is pkcs1 public key. */
- RSA_KEY_FORMAT_PKCS08_PRIVATE_KEY = 2, /**< % rsa key format is pkcs8 private key. */
- RSA_KEY_FORMAT_X509_PUBLIC_KEY = 3, /**< % rsa key format is X509 public key. */
- RSA_KEY_FORMAT_UNKNOWN = 0xffffffff /**< % rsa key format is unknown. */
+ RSA_KEY_FORMAT_PKCS01_PRIVATE_KEY = 0, /**< The rsa key format is PKCS1 private key */
+ RSA_KEY_FORMAT_PKCS01_PUBLIC_KEY = 1, /**< The rsa key format is PKCS1 public key */
+ RSA_KEY_FORMAT_PKCS08_PRIVATE_KEY = 2, /**< The rsa key format is PKCS8 private key */
+ RSA_KEY_FORMAT_X509_PUBLIC_KEY = 3, /**< The rsa key format is X509 public key */
+ RSA_KEY_FORMAT_UNKNOWN = 0xffffffff /**< The rsa key format is unknown */
}; //RsaKeyFormat;
/**
* @class RsaKeyConverter
* @brief This class provides support for converting the RSA public/private key in multiple key formats and multiple encoding formats.
- * Supported RSA key formats are PKCS1/PKCS8/X509.
- * Supported encoding formats are DER/PEM.
+ *
* @since 2.1
+ *
+ * The %RsaKeyConverter class provides support for converting the RSA public/private key in multiple key formats and multiple encoding formats. @n
+ * Supported RSA key formats are PKCS1/PKCS8/X509. @n
+ * Supported encoding formats are DER/PEM.
*/
class _OSP_EXPORT_ RsaKeyConverter
public:
/**
- * Generates a RSA encoded private key in the passed input RSA key format.
- * If the input private key is in PEM encoded format then the output RSA private key will be PEM encoded and if it is in DER encoded format
+ * Generates a RSA encoded private key in the passed input RSA key format. @n
+ * If the input private key is in PEM encoded format, then the output RSA private key will be PEM encoded; if it is in DER encoded format,
* then the output RSA private key will be DER encoded.
*
* @since 2.1
*
- * @return A pointer to the encoded %ByteBuffer instance, @n
- * else @c null if the method fails to convert the private key in the passed input format.
- * @param[in] format An enum value contains the RSA private key format.
- * Valid values for the supported output RSA private key formats are only RSA_KEY_FORMAT_PKCS01_PRIVATE_KEY, RSA_KEY_FORMAT_PKCS08_PRIVATE_KEY.
- * @param[in] key An instance of IPrivateKey.
+ * @return A pointer to the encoded Tizen::Base::ByteBuffer instance, @n
+ * else @c null if the method fails to convert the private key in the passed input format
+ * @param[in] format An enum value that contains the RSA private key format @n
+ * Valid values for the supported output RSA private key formats are only @c RSA_KEY_FORMAT_PKCS01_PRIVATE_KEY and @c RSA_KEY_FORMAT_PKCS08_PRIVATE_KEY.
+ * @param[in] key An instance of IPrivateKey
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static Tizen::Base::ByteBuffer* ConvertPrivateKeyFormatN(RsaKeyFormat format, const IPrivateKey& key);
/**
- * Generates a RSA encoded public key in the passed input RSA key format.
- * If the input public key is in PEM encoded format then the output RSA public key will be PEM encoded and if it is in DER encoded format
+ * Generates a RSA encoded public key in the passed input RSA key format. @n
+ * If the input public key is in PEM encoded format, then the output RSA public key will be PEM encoded; if it is in DER encoded format,
* then the output RSA public key will be DER encoded.
*
* @since 2.1
*
- * @return A pointer to the encoded %ByteBuffer instance, @n
- * else @c null if the method fails to convert the public key in the passed input format.
- * @param[in] format An enum value contains the RSA public key format.
- * Valid values for the supported output RSA public key formats are only RSA_KEY_FORMAT_PKCS01_PUBLIC_KEY, RSA_KEY_FORMAT_X509_PUBLIC_KEY.
- * @param[in] key An instance of IPublicKey.
+ * @return A pointer to the encoded Tizen::Base::ByteBuffer instance, @n
+ * else @c null if the method fails to convert the public key in the passed input format
+ * @param[in] format An enum value that contains the RSA public key format @n
+ * Valid values for the supported output RSA public key formats are only @c RSA_KEY_FORMAT_PKCS01_PUBLIC_KEY and @c RSA_KEY_FORMAT_X509_PUBLIC_KEY.
+ * @param[in] key An instance of IPublicKey
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static Tizen::Base::ByteBuffer* ConvertPublicKeyFormatN(RsaKeyFormat format, const IPublicKey& key);
*
* @since 2.1
*
- * @return A pointer to the PEM encoded %ByteBuffer instance, @n
- else @c null if the method fails to convert the key in the pem encoded format.
- * @param[in] format An enum value contains the RSA key format of the input key.
- * @param[in] key An instance of IKey.
+ * @return A pointer to the PEM encoded Tizen::Base::ByteBuffer instance, @n
+ * else @c null if the method fails to convert the key in the PEM encoded format
+ * @param[in] format An enum value that contains the RSA key format of the input key
+ * @param[in] key An instance of IKey
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static Tizen::Base::ByteBuffer* ConvertDerToPemN(RsaKeyFormat format, const IKey& key);
*
* @since 2.1
*
- * @return A pointer to the DER encoded %ByteBuffer instance, @n
- else @c null if the method fails to convert the key in the der encoded format.
- * @param[in] format An enum value contains the RSA key format of the input key.
- * @param[in] key An instance of IKey,
+ * @return A pointer to the DER encoded Tizen::Base::ByteBuffer instance, @n
+ * else @c null if the method fails to convert the key in the DER encoded format
+ * @param[in] format An enum value that contains the RSA key format of the input key
+ * @param[in] key An instance of IKey
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static Tizen::Base::ByteBuffer* ConvertPemToDerN(RsaKeyFormat format, const IKey& key);
result Construct(const Tizen::Base::ByteBuffer& keyBytes);
/**
- * Constructs and initializes this instance of %SecretKeyGenerator for the specified algorithm.
+ * Constructs and initializes this instance of %SecretKeyGenerator for the specified @c algorithm.
*
* @since 2.0
*
* @return An error code
* @param[in] algorithm The name of the secure random generator algorithm @n
- * For example, "AES","DES" or "3DES".
+ * For example, "AES","DES", or "3DES".
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c algorithm is invalid or an empty string.
* @exception E_OUT_OF_MEMORY The memory is insufficient.