I have problem on Unix, have to create a lot of passwords in smd5 but don't know how to generate smd5 passwords using some unix tool or perl in a form: {smd5}DoZgZ.OE$vSg4ZH7Bpy0BCdXNzBj001
I have never had any problems to generate anything on linux in md5/sha256/sha512 with tools like e.g. openssl
I have tried with Perl using something like that:
use Digest::MD5;
use MIME::Base64;
$ctx = Digest::MD5->new;
$ctx->add('vwkfA17aF`');
$salt = 'DoZgZ.OE';
$ctx->add($salt);
$hashedPasswd = '{smd5}' . encode_base64($ctx->digest . $salt ,'');
print $hashedPasswd . "\n";
but unfortunatelly output is quite different : {smd5}5zJphaZULO3gnT1pwT1YHERvWmdaLk9F I do not see salt there like here {smd5}DoZgZ.OE$vSg4ZH7Bpy0BCdXNzBj001 and string is longer
{SMD5}JEtto0tKAgflRNTojlT+0H7QziA=
, not with a$
separator between the salt and the hash. This seems to be a non-standard format, where did you encounter it?