| 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 | |
| 21 | struct st_maria_share; |
| 22 | struct st_pagecache_file; |
| 23 | |
| 24 | uint ();/* bytes in data/index page header */ |
| 25 | uint (struct st_maria_share *); |
| 26 | uint ma_crypt_get_file_length(); /* bytes needed in file */ |
| 27 | int ma_crypt_create(struct st_maria_share *); /* create encryption data */ |
| 28 | int ma_crypt_write(struct st_maria_share *, File); /* write encryption data */ |
| 29 | uchar* ma_crypt_read(struct st_maria_share *, uchar *buff); /* read crypt data*/ |
| 30 | |
| 31 | void ma_crypt_set_data_pagecache_callbacks(struct st_pagecache_file *file, |
| 32 | struct st_maria_share *share); |
| 33 | |
| 34 | void ma_crypt_set_index_pagecache_callbacks(struct st_pagecache_file *file, |
| 35 | struct st_maria_share *share); |
| 36 | |
| 37 | void ma_crypt_free(struct st_maria_share *share); |
| 38 | |
| 39 | #endif |
| 40 | |