//
-// Open Service Platform
// Copyright (c) 2013 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
/**
* @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.