#!/usr/bin/perl

# returns todays' date as SHA1 digest of DateTime->today() value - overkill method
# to bypass external user submitting bookmarked login page (need to go through '/')

use strict;
use warnings;

BEGIN {
    use FindBin qw($RealBin); # warn $RealBin;
    use lib (
        '/home/raj/perl5/lib/perl5',
        $RealBin . '/../../lib'
    );
}

use CGI qw(:standard);
use LIMS::Local::Utils;

# use same methods as LIMS::_check_portal_referral() to generate SHA1 hash:
my $today = LIMS::Local::Utils::today->datetime;
my $str   = LIMS::Local::Utils::sha1_digest($today);
print header() . $str;
