Anyone know how to generate Hashes with the command line on Linux? I have to generate a Hash with SHA1 + salt= Password:Cat Salt:XN10Zj2c and a Hash with MD4= Password:Cat
Thank you for your help!
Anyone know how to generate Hashes with the command line on Linux? I have to generate a Hash with SHA1 + salt= Password:Cat Salt:XN10Zj2c and a Hash with MD4= Password:Cat
Thank you for your help!
The problem here is that there is no generic way of hashing a password and a salt. In all likelihood you need to mimic the
cryptcommand line tool, as it doesn't contain these algorithms (hence I've used -1 and -2 as algorithm identifiers instead).For instance:
Note that the
$signs are used to separate the different parts of the output within the "cryptformat". However, they are not part of what is actually hashed. Also,cryptnormally hashes the password followed by the salt, not the other way around.However, please note that you should use neither of these old, broken hashes nor should you use a newer hash such as SHA-2 or SHA-3. The reason for this is that you should be using a PBKDF such as PBKDF2 or Argon2 with a high iteration count or work factor and preferably a 16 byte random salt. These functions are sometimes also called "password hashes" and with good reason; they provide additional protection against brute force and dictionary attacks.