Skip to content

Commit

Permalink
utils: use Digest::SHA for sha1pass
Browse files Browse the repository at this point in the history
Debian (Closes: #625812)

Author: Salvatore Bonaccorso <carnil@debian.org>

Logic can be added if we need to check between these.

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
  • Loading branch information
carnil authored and geneC committed Nov 4, 2017
1 parent 523250b commit 1efb5bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/sha1pass
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

use bytes;
use Digest::SHA1;
use Digest::SHA;
use MIME::Base64;

sub random_bytes($) {
Expand Down Expand Up @@ -29,6 +29,6 @@ sub random_bytes($) {
unless (defined($salt)) {
$salt = MIME::Base64::encode(random_bytes(6), '');
}
$pass = Digest::SHA1::sha1_base64($salt, $pass);
$pass = Digest::SHA::sha1_base64($salt, $pass);

print '$4$', $salt, '$', $pass, "\$\n";

0 comments on commit 1efb5bf

Please sign in to comment.