diff --git a/src/modules/module_00101.c b/src/modules/module_00101.c index 94297e2a0..2a7ae4609 100644 --- a/src/modules/module_00101.c +++ b/src/modules/module_00101.c @@ -16,7 +16,7 @@ static const u32 DGST_POS1 = 4; static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 1; static const u32 DGST_SIZE = DGST_SIZE_4_5; -static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH; +static const u32 HASH_CATEGORY = HASH_CATEGORY_NETWORK_SERVER; static const char *HASH_NAME = "nsldap, SHA-1(Base64), Netscape LDAP SHA"; static const u32 HASH_TYPE = HASH_TYPE_SHA1; static const u64 KERN_TYPE = 100; diff --git a/src/modules/module_06211.c b/src/modules/module_06211.c index 3651db2b1..749a48367 100644 --- a/src/modules/module_06211.c +++ b/src/modules/module_06211.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-RIPEMD160 + XTS 512 bit"; +static const char *HASH_NAME = "TrueCrypt RIPEMD160 + XTS 512 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6211; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06212.c b/src/modules/module_06212.c index 96ee1c5a7..bb610229d 100644 --- a/src/modules/module_06212.c +++ b/src/modules/module_06212.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-RIPEMD160 + XTS 1024 bit"; +static const char *HASH_NAME = "TrueCrypt RIPEMD160 + XTS 1024 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6212; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06213.c b/src/modules/module_06213.c index 12127b125..89ff8a76e 100644 --- a/src/modules/module_06213.c +++ b/src/modules/module_06213.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-RIPEMD160 + XTS 1536 bit"; +static const char *HASH_NAME = "TrueCrypt RIPEMD160 + XTS 1536 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6213; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06221.c b/src/modules/module_06221.c index c12429cbc..588d8ee80 100644 --- a/src/modules/module_06221.c +++ b/src/modules/module_06221.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_8_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-SHA512 + XTS 512 bit"; +static const char *HASH_NAME = "TrueCrypt SHA512 + XTS 512 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6221; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06222.c b/src/modules/module_06222.c index 318b53a60..21a52dee0 100644 --- a/src/modules/module_06222.c +++ b/src/modules/module_06222.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_8_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-SHA512 + XTS 1024 bit"; +static const char *HASH_NAME = "TrueCrypt SHA512 + XTS 1024 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6222; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06223.c b/src/modules/module_06223.c index a694b35d7..0e4e3d646 100644 --- a/src/modules/module_06223.c +++ b/src/modules/module_06223.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_8_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-SHA512 + XTS 1536 bit"; +static const char *HASH_NAME = "TrueCrypt SHA512 + XTS 1536 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6223; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06231.c b/src/modules/module_06231.c index 57de3a4a6..9982404da 100644 --- a/src/modules/module_06231.c +++ b/src/modules/module_06231.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-Whirlpool + XTS 512 bit"; +static const char *HASH_NAME = "TrueCrypt Whirlpool + XTS 512 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6231; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06232.c b/src/modules/module_06232.c index 5190b325f..cabfccf2d 100644 --- a/src/modules/module_06232.c +++ b/src/modules/module_06232.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-Whirlpool + XTS 1024 bit"; +static const char *HASH_NAME = "TrueCrypt Whirlpool + XTS 1024 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6232; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06233.c b/src/modules/module_06233.c index 9f30557bd..13b12b514 100644 --- a/src/modules/module_06233.c +++ b/src/modules/module_06233.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-Whirlpool + XTS 1536 bit"; +static const char *HASH_NAME = "TrueCrypt Whirlpool + XTS 1536 bit"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6233; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06241.c b/src/modules/module_06241.c index 768c49586..1902d81d7 100644 --- a/src/modules/module_06241.c +++ b/src/modules/module_06241.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-RIPEMD160 + XTS 512 bit + boot-mode"; +static const char *HASH_NAME = "TrueCrypt RIPEMD160 + XTS 512 bit + boot-mode"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6211; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06242.c b/src/modules/module_06242.c index 2c12581cf..5ea1a80f3 100644 --- a/src/modules/module_06242.c +++ b/src/modules/module_06242.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-RIPEMD160 + XTS 1024 bit + boot-mode"; +static const char *HASH_NAME = "TrueCrypt RIPEMD160 + XTS 1024 bit + boot-mode"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6212; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/modules/module_06243.c b/src/modules/module_06243.c index 145d2d944..91d64c1fe 100644 --- a/src/modules/module_06243.c +++ b/src/modules/module_06243.c @@ -20,7 +20,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 3; static const u32 DGST_SIZE = DGST_SIZE_4_5; static const u32 HASH_CATEGORY = HASH_CATEGORY_FDE; -static const char *HASH_NAME = "TrueCrypt PBKDF2-HMAC-RIPEMD160 + XTS 1536 bit + boot-mode"; +static const char *HASH_NAME = "TrueCrypt RIPEMD160 + XTS 1536 bit + boot-mode"; static const u32 HASH_TYPE = HASH_TYPE_GENERIC; static const u64 KERN_TYPE = 6213; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE diff --git a/src/usage.c b/src/usage.c index 031f07799..167fc79e9 100644 --- a/src/usage.c +++ b/src/usage.c @@ -251,7 +251,15 @@ static int sort_by_usage (const void *p1, const void *p2) if (u1->hash_category > u2->hash_category) return 1; if (u1->hash_category < u2->hash_category) return -1; - return strcmp (u1->hash_name, u2->hash_name); + const int rc_name = strncmp (u1->hash_name + 1, u2->hash_name + 1, 15); // yes, strange... + + if (rc_name > 0) return 1; + if (rc_name < 0) return -1; + + if (u1->hash_mode > u2->hash_mode) return 1; + if (u1->hash_mode < u2->hash_mode) return -1; + + return 0; } void usage_mini_print (const char *progname)