Created
March 21, 2017 09:19
-
-
Save MagnusEnger/7363992af8ec02b707d7b91afcb278e4 to your computer and use it in GitHub Desktop.
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/perl | |
use Digest::SHA qw( sha512_hex ); | |
use Test::More; | |
use Modern::Perl; | |
use utf8; | |
my $digest1 = uc sha512_hex( 'The quick brown fox jumps over the lazy dog' ); | |
my $truth1 = '07E547D9586F6A73F73FBAC0435ED76951218FB7D0C8D788A309D785436BBB642E93A252A954F23912547D1E8A3B5ED6E1BFD7097821233FA0538F3DB854FEE6'; | |
is( $digest1, $truth1, 'Fox OK' ); | |
my $digest2 = uc sha512_hex( 'ÆØÅæøå' ); | |
my $truth2 = '5C3F28BAC9046092B1F161EB7439C813F1BADA413FA59BA2122A95E36A911FA18687623C27CA7BECA795775EDE61943219C423E7A3669F9D1BE4FF64BC2F834F'; | |
is( $digest2, $truth2, 'Wovels OK' ); | |
done_testing() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment