2 * Copyright (c) 2017 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 #ifndef __EXTENSION_ENCRYPTION_H__
18 #define __EXTENSION_ENCRYPTION_H__
27 * This class provides APIs to manage the encryption of external storage
28 * such as SD card, used as an extension of the internal memory.
31 class ExtensionEncryption final {
33 ExtensionEncryption(ODEControlContext& ctxt);
34 ~ExtensionEncryption();
36 int mount(const std::string& password);
39 int format(const std::string& password);
41 int isPasswordInitialized();
42 int initPassword(const std::string& password);
43 int cleanPassword(const std::string& password);
44 int changePassword(const std::string& oldPW, const std::string& newPW);
45 int verifyPassword(const std::string& password);
55 ODEControlContext& context;
60 #endif // __EXTENSION_ENCRYPTION_H__