Last active
June 15, 2019 17:35
-
-
Save epixoip/2eb8866adf1b34c4fac01850b580b0cb to your computer and use it in GitHub Desktop.
Oracle Transportation Management reference hash implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Oracle Transportation Management reference hash implementation | |
# Fri 14 Jun 2019 11:02:08 PM CDT, jgosney@terahash.com | |
use strict; | |
use warnings; | |
use Crypt::Digest::SHA256 qw(sha256); | |
use MIME::Base64; | |
my $iterations = 1000; | |
my $password = "hashcat"; | |
my $salt = "1234567890"; | |
my $hash = sha256($salt.$password); | |
for (my $i = 1; $i < $iterations; $i++) { | |
$hash = sha256($hash) | |
} | |
chomp($hash = encode_base64($hash)); | |
printf("otm_sha256:%d:%s:%s\n", $iterations, $salt, $hash); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment