X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFSecPkcsPkcs05Schemes.h;h=32cf37b8104bafef95043bfb326859489c4f83a4;hb=d6a5cb0833a49efab12f1f9e7b6107080b7fd719;hp=14a9363738659affe99edc910ed80da730c7cbcc;hpb=f82580836f6cc4193aefcea56e44b38301559b76;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/inc/FSecPkcsPkcs05Schemes.h b/inc/FSecPkcsPkcs05Schemes.h old mode 100644 new mode 100755 index 14a9363..32cf37b --- a/inc/FSecPkcsPkcs05Schemes.h +++ b/inc/FSecPkcsPkcs05Schemes.h @@ -35,10 +35,13 @@ namespace Tizen { namespace Security { namespace Pkcs /** * @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 @@ -61,30 +64,30 @@ public: 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. @@ -93,80 +96,78 @@ public: 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. */