blob: 1c9cef0a5478e05f4817a84b24333d662eebcb40 [file] [log] [blame]
Ethan Yonker79f88bd2016-12-09 14:52:12 -06001/*
2 * Copyright (C) 2016 Team Win Recovery Project
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef __EXT4CRYPT_TAR_H
18#define __EXT4CRYPT_TAR_H
19
20#include <sys/cdefs.h>
21#include <stdbool.h>
22#include <cutils/multiuser.h>
23
24__BEGIN_DECLS
25
26bool lookup_ref_key(const char* policy, char* policy_type);
27bool lookup_ref_tar(const char* policy_type, char* policy);
28
29void policy_to_hex(const char* policy, char* hex);
30bool e4crypt_policy_set(const char *directory, const char *policy,
31 size_t policy_length, int contents_encryption_mode);
32bool e4crypt_policy_get(const char *directory, char *policy,
33 size_t policy_length, int contents_encryption_mode);
34
35bool e4crypt_set_mode();
36__END_DECLS
37
38#endif