1*9663SMark.Logan@Sun.COM /** 2*9663SMark.Logan@Sun.COM * crypto.h - Exports for dealing with encrypted files. Part of the 3*9663SMark.Logan@Sun.COM * Linux-NTFS project. 4*9663SMark.Logan@Sun.COM * 5*9663SMark.Logan@Sun.COM * Copyright (c) 2007 Yura Pakhuchiy 6*9663SMark.Logan@Sun.COM * 7*9663SMark.Logan@Sun.COM * This program is free software; you can redistribute it and/or modify 8*9663SMark.Logan@Sun.COM * it under the terms of the GNU General Public License as published by 9*9663SMark.Logan@Sun.COM * the Free Software Foundation; either version 2 of the License, or 10*9663SMark.Logan@Sun.COM * (at your option) any later version. 11*9663SMark.Logan@Sun.COM * 12*9663SMark.Logan@Sun.COM * This program is distributed in the hope that it will be useful, 13*9663SMark.Logan@Sun.COM * but WITHOUT ANY WARRANTY; without even the implied warranty of 14*9663SMark.Logan@Sun.COM * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*9663SMark.Logan@Sun.COM * GNU General Public License for more details. 16*9663SMark.Logan@Sun.COM * 17*9663SMark.Logan@Sun.COM * You should have received a copy of the GNU General Public License 18*9663SMark.Logan@Sun.COM * along with this program (in the main directory of the Linux-NTFS 19*9663SMark.Logan@Sun.COM * distribution in the file COPYING); if not, write to the Free Software 20*9663SMark.Logan@Sun.COM * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21*9663SMark.Logan@Sun.COM */ 22*9663SMark.Logan@Sun.COM 23*9663SMark.Logan@Sun.COM #ifndef _NTFS_CRYPTO_H 24*9663SMark.Logan@Sun.COM #define _NTFS_CRYPTO_H 25*9663SMark.Logan@Sun.COM 26*9663SMark.Logan@Sun.COM extern ntfschar NTFS_EFS[5]; 27*9663SMark.Logan@Sun.COM 28*9663SMark.Logan@Sun.COM /* 29*9663SMark.Logan@Sun.COM * This is our Big Secret (TM) structure, so do not allow anyone even read it 30*9663SMark.Logan@Sun.COM * values. ;-) In fact, it is private because exist only in libntfs version 31*9663SMark.Logan@Sun.COM * compiled with cryptography support, so users can not depend on it. 32*9663SMark.Logan@Sun.COM */ 33*9663SMark.Logan@Sun.COM typedef struct _ntfs_crypto_attr ntfs_crypto_attr; 34*9663SMark.Logan@Sun.COM 35*9663SMark.Logan@Sun.COM /* 36*9663SMark.Logan@Sun.COM * These functions should not be used directly. They are called for encrypted 37*9663SMark.Logan@Sun.COM * attributes from corresponding functions without _crypto_ part. 38*9663SMark.Logan@Sun.COM */ 39*9663SMark.Logan@Sun.COM 40*9663SMark.Logan@Sun.COM extern int ntfs_crypto_attr_open(ntfs_attr *na); 41*9663SMark.Logan@Sun.COM extern void ntfs_crypto_attr_close(ntfs_attr *na); 42*9663SMark.Logan@Sun.COM 43*9663SMark.Logan@Sun.COM extern s64 ntfs_crypto_attr_pread(ntfs_attr *na, const s64 pos, s64 count, 44*9663SMark.Logan@Sun.COM void *b); 45*9663SMark.Logan@Sun.COM 46*9663SMark.Logan@Sun.COM #endif /* _NTFS_CRYPTO_H */ 47