summaryrefslogtreecommitdiffstats
path: root/crypto/ics/cryptfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ics/cryptfs.h')
-rw-r--r--crypto/ics/cryptfs.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/crypto/ics/cryptfs.h b/crypto/ics/cryptfs.h
index 1c1bc1aea..e2fb7a7f3 100644
--- a/crypto/ics/cryptfs.h
+++ b/crypto/ics/cryptfs.h
@@ -25,6 +25,13 @@
* of the partition.
*/
+#ifndef __CRYPTFS_H__
+#define __CRYPTFS_H__
+
+#ifdef TW_INCLUDE_CRYPTO_SAMSUNG
+#include "../libcrypt_samsung/include/libcrypt_samsung.h"
+#endif
+
#define CRYPT_FOOTER_OFFSET 0x4000
#define MAX_CRYPTO_TYPE_NAME_LEN 64
@@ -37,11 +44,16 @@
#define CRYPT_ENCRYPTION_IN_PROGRESS 0x2 /* Set when starting encryption,
* clear when done before rebooting */
+#ifdef TW_INCLUDE_CRYPTO_SAMSUNG
+#define CRYPT_MNT_MAGIC_SAMSUNG 0xD0B5B1C5
+#endif
#define CRYPT_MNT_MAGIC 0xD0B5B1C4
#define __le32 unsigned int
#define __le16 unsigned short int
+#pragma pack(1)
+
struct crypt_mnt_ftr {
__le32 magic; /* See above */
__le16 major_version;
@@ -53,37 +65,25 @@ struct crypt_mnt_ftr {
__le64 fs_size; /* Size of the encrypted fs, in 512 byte sectors */
__le32 failed_decrypt_count; /* count of # of failed attempts to decrypt and
mount, set to 0 on successful mount */
- unsigned char crypto_type_name[MAX_CRYPTO_TYPE_NAME_LEN]; /* The type of encryption
+ char crypto_type_name[MAX_CRYPTO_TYPE_NAME_LEN]; /* The type of encryption
needed to decrypt this
partition, null terminated */
+#ifdef TW_INCLUDE_CRYPTO_SAMSUNG
+ edk_payload_t edk_payload;
+ __le32 unknown_end;
+#endif
};
-struct volume_info {
- unsigned int size;
- unsigned int flags;
- struct crypt_mnt_ftr crypt_ftr;
- char mnt_point[256];
- char blk_dev[256];
- char crypto_blkdev[256];
- char label[256];
-};
-#define VOL_NONREMOVABLE 0x1
-#define VOL_ENCRYPTABLE 0x2
+#pragma pack()
+
#ifdef __cplusplus
extern "C" {
#endif
- int cryptfs_crypto_complete(void);
- int cryptfs_check_passwd(char *pw);
- int cryptfs_verify_passwd(char *newpw);
- int cryptfs_restart(void);
- int cryptfs_enable(char *flag, char *passwd);
- int cryptfs_changepw(char *newpw);
- int cryptfs_setup_volume(const char *label, int major, int minor,
- char *crypto_dev_path, unsigned int max_pathlen,
- int *new_major, int *new_minor);
- int cryptfs_revert_volume(const char *label);
+ int cryptfs_check_passwd(const char *pw);
#ifdef __cplusplus
}
#endif
+#endif // __CRYPTFS_H__
+