summaryrefslogtreecommitdiffstats
path: root/crypto/ics/cryptfs.h
diff options
context:
space:
mode:
authora3955269 <a3955269>2013-01-08 17:14:56 +0100
committerDees_Troy <dees_troy@teamw.in>2013-01-08 21:09:56 +0100
commit6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1 (patch)
tree2617e02d06b317d4f40779131a9e494b163f6651 /crypto/ics/cryptfs.h
parentMerge "Fix up libmincrypt rules for Android 4.2" into jb-wip (diff)
downloadandroid_bootable_recovery-6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1.tar
android_bootable_recovery-6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1.tar.gz
android_bootable_recovery-6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1.tar.bz2
android_bootable_recovery-6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1.tar.lz
android_bootable_recovery-6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1.tar.xz
android_bootable_recovery-6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1.tar.zst
android_bootable_recovery-6ff55cefd060b4c8f6c0fa97d5521516f9ee43f1.zip
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__
+