From 79f88bdf8d54a84b7bb727b0c28b2dfcdc3d14d5 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 9 Dec 2016 14:52:12 -0600 Subject: Support backup/restore of FBE policies Change-Id: Iba8ef20f57b0fb57bb9406c53148a806441d0b59 --- crypto/ext4crypt/ext4crypt_tar.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 crypto/ext4crypt/ext4crypt_tar.h (limited to 'crypto/ext4crypt/ext4crypt_tar.h') diff --git a/crypto/ext4crypt/ext4crypt_tar.h b/crypto/ext4crypt/ext4crypt_tar.h new file mode 100644 index 000000000..1c9cef0a5 --- /dev/null +++ b/crypto/ext4crypt/ext4crypt_tar.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2016 Team Win Recovery 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 __EXT4CRYPT_TAR_H +#define __EXT4CRYPT_TAR_H + +#include +#include +#include + +__BEGIN_DECLS + +bool lookup_ref_key(const char* policy, char* policy_type); +bool lookup_ref_tar(const char* policy_type, char* policy); + +void policy_to_hex(const char* policy, char* hex); +bool e4crypt_policy_set(const char *directory, const char *policy, + size_t policy_length, int contents_encryption_mode); +bool e4crypt_policy_get(const char *directory, char *policy, + size_t policy_length, int contents_encryption_mode); + +bool e4crypt_set_mode(); +__END_DECLS + +#endif -- cgit v1.2.3