1/*
2 Copyright (c) 2013 Google Inc.
3 Copyright (c) 2014, 2015 MariaDB Corporation
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
17
18#ifndef STORAGE_MARIA_MA_CRYPT_INCLUDED
19#define STORAGE_MARIA_MA_CRYPT_INCLUDED
20
21struct st_maria_share;
22struct st_pagecache_file;
23
24uint ma_crypt_get_data_page_header_space();/* bytes in data/index page header */
25uint ma_crypt_get_index_page_header_space(struct st_maria_share *);
26uint ma_crypt_get_file_length(); /* bytes needed in file */
27int ma_crypt_create(struct st_maria_share *); /* create encryption data */
28int ma_crypt_write(struct st_maria_share *, File); /* write encryption data */
29uchar* ma_crypt_read(struct st_maria_share *, uchar *buff); /* read crypt data*/
30
31void ma_crypt_set_data_pagecache_callbacks(struct st_pagecache_file *file,
32 struct st_maria_share *share);
33
34void ma_crypt_set_index_pagecache_callbacks(struct st_pagecache_file *file,
35 struct st_maria_share *share);
36
37void ma_crypt_free(struct st_maria_share *share);
38
39#endif
40