2016-06-02 20:04:27 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _METADATA_CRYPT_H
|
|
|
|
#define _METADATA_CRYPT_H
|
|
|
|
|
2018-01-30 18:48:19 +01:00
|
|
|
#include <string>
|
|
|
|
|
2020-02-07 21:51:56 +01:00
|
|
|
#include "KeyBuffer.h"
|
|
|
|
#include "KeyUtil.h"
|
|
|
|
|
2020-02-07 21:45:20 +01:00
|
|
|
namespace android {
|
|
|
|
namespace vold {
|
|
|
|
|
2021-09-22 02:21:57 +02:00
|
|
|
void defaultkey_precreate_dm_device();
|
2019-06-25 23:44:33 +02:00
|
|
|
bool fscrypt_mount_metadata_encrypted(const std::string& block_device,
|
2020-12-15 18:00:49 +01:00
|
|
|
const std::string& mount_point, bool needs_encrypt,
|
|
|
|
bool should_format, const std::string& fs_type);
|
2016-06-02 20:04:27 +02:00
|
|
|
|
2020-02-07 21:51:56 +01:00
|
|
|
bool defaultkey_volume_keygen(KeyGeneration* gen);
|
|
|
|
|
|
|
|
bool defaultkey_setup_ext_volume(const std::string& label, const std::string& blk_device,
|
|
|
|
const android::vold::KeyBuffer& key,
|
|
|
|
std::string* out_crypto_blkdev);
|
|
|
|
|
2020-10-07 08:20:00 +02:00
|
|
|
bool destroy_dsu_metadata_key(const std::string& dsu_slot);
|
|
|
|
|
2020-02-07 21:45:20 +01:00
|
|
|
} // namespace vold
|
|
|
|
} // namespace android
|
2016-06-02 20:04:27 +02:00
|
|
|
#endif
|