2 * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
17 * @file crypto_service.h
18 * @author Dongsun Lee (ds73.lee@samsung.com)
20 * @brief a header for key manupulatation.
25 #ifndef __TIZEN_CORE_WAE_CRYPTO_SERVICE_H
26 #define __TIZEN_CORE_WAE_CRYPTO_SERVICE_H
35 int encrypt_app_dek(const unsigned char* rsaPublicKey, size_t pubKeyLen,
36 const unsigned char* dek, const int dekLen,
37 unsigned char** encryptedDek, size_t* encryptedDekLen);
39 int decrypt_app_dek(const unsigned char* rsaPrivateKey, size_t priKeyLen,
40 const char* priKeyPassword,
41 const unsigned char* encryptedDek, size_t dencryptedDekLen,
42 unsigned char** decryptedDek, size_t* decryptedDekLen);
45 int encrypt_aes_cbc(const unsigned char* pKey, size_t keyLen,
46 const unsigned char* pData, size_t dataLen,
47 unsigned char** ppEncryptedData, size_t* pEncDataLen);
49 int decrypt_aes_cbc(const unsigned char* pKey, size_t keyLen,
50 const unsigned char* pData, size_t dataLen,
51 unsigned char** ppDecryptedData, size_t* pDecDataLen);
56 #endif /* __TIZEN_CORE_WAE_CRYPTO_SERVICE_H */