Win32: add a new build-script helper
[vlc.git] / modules / keystore / file_crypt.h
blob0d5ca7be656f40f0ff6cbeeaa49c9f0b0f2b89bc
1 /*****************************************************************************
2 * file_crypt.h: Crypt extension of the keystore memory module
3 *****************************************************************************
4 * Copyright © 2016 VLC authors, VideoLAN and VideoLabs
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
21 #if defined(__ANDROID__) || defined(_WIN32)
22 # define CRYPTFILE
24 struct crypt
26 void * p_ctx;
27 size_t (*pf_encrypt)(vlc_keystore *, void *, const uint8_t *, size_t, uint8_t **);
28 size_t (*pf_decrypt)(vlc_keystore *, void *, const uint8_t *, size_t, uint8_t **);
29 void (*pf_clean)(vlc_keystore *, void *);
32 int CryptInit(vlc_keystore *, struct crypt *);
34 #endif