X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFSecPkcsPkcs05PbEs2Parameters.h;h=c6a7af583d0a77f3c5a5a4da98da4e36673a4df5;hb=07a771d39ebf4c7f26a04aeb3e06f9d7eb1c6dc2;hp=d38e8262d542a5491d19714aec9c168c39f7864b;hpb=ce380ff0d6dfbf0b1420e0b045f6077f2e124573;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/inc/FSecPkcsPkcs05PbEs2Parameters.h b/inc/FSecPkcsPkcs05PbEs2Parameters.h old mode 100644 new mode 100755 index d38e826..c6a7af5 --- a/inc/FSecPkcsPkcs05PbEs2Parameters.h +++ b/inc/FSecPkcsPkcs05PbEs2Parameters.h @@ -1,5 +1,4 @@ // -// Open Service Platform // Copyright (c) 2013 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); @@ -36,17 +35,20 @@ namespace Tizen { namespace Security { namespace Pkcs /** * @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 provides methods for 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 * */ @@ -73,39 +75,39 @@ public: 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 specified encoded Tizen::Base::ByteBuffer, which contains + * 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. - * @exception E_SUCCESS The method is successful. + * @param[in] encodedData The 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 the 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. - * @exception E_SUCCESS The method is successful. + * @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 instance 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. @@ -113,46 +115,46 @@ public: 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 a 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 will consist of id-PBKDF2 for this version of PKCS #5. * * @since 2.1 * - * @return A reference to AlgorithmIdentifier holding the underlying key derivation function. + * @return A reference to the AlgorithmIdentifier instance 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 a 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 the AlgorithmIdentifier instance 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 The PkcsAlgorithmParameterType instance holding the enum value @c PKCS_ALGO_PARAM_TYPE_PKCS05_PBES02 for PBES2 Parameters * */ virtual PkcsAlgorithmParameterType GetType(void) const; @@ -164,9 +166,9 @@ public: * * @return @c true if the specified instance equals the current instance, @n * else @c false - * @param[in] rhs An instance of %Pkcs05PbEs2Parameters + * @param[in] rhs An instance of %Pkcs05PbEs2Parameters * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_ARG The specified input parameter is invalid. * @remarks The specific error code can be accessed using the GetLastResult() method. */ virtual bool Equals(const Tizen::Base::Object& rhs) const;