Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / include / internal / credentialgenerator.h
1 /* *****************************************************************
2  *
3  * Copyright 2015 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * *****************************************************************/
20
21 #ifndef SP_CREDENTIAL_GENERATOR_H
22 #define SP_CREDENTIAL_GENERATOR_H
23
24 #include "ocstack.h"
25 #include "securevirtualresourcetypes.h"
26 #include "provisioningmanager.h"
27
28 /**
29  * Function to generate credentials according to the type.
30  *
31  * @param[in]  type           Type of credential.
32  * @param[in]  ptDeviceId     Device ID of provisioning tool.
33  * @param[in]  firstDeviceId  DeviceID of the first device.
34  * @param[in]  secondDeviceId DeviceID of the second device.
35  * @param[out] firstCred      Generated credential for first device.
36  * @param[out] secondCred     Generated credential for second device.
37  * @return  SP_SUCCESS on success
38  */
39 SPResult SPGeneratePairWiseCredentials(OicSecCredType_t type, const OicUuid_t *ptDeviceId,
40                                        const OicUuid_t *firstDeviceId,
41                                        const OicUuid_t *secondDeviceId,
42                                        OicSecCred_t **firstCred,
43                                        OicSecCred_t **secondCred);
44
45 #ifdef __cplusplus
46 }
47 #endif
48 #endif //SP_CREDENTIAL_GENERATOR_H