So I'm looking to use SHA-512 with PBKDF2 to implement Bitcoin BIP-039. I have managed to work out that SHA-512 falls under SHA2 but when I specify that as the hashing function, even with 64 byte output, it still reports as using SHA-256. Am I missing something? I tried adding +512 to the hash_class but that didn't work.
#!/usr/bin/perl
#
use Crypt::PBKDF2;
my $sentence="Hellothere";
my $salt="mnemonic";
my $pbkdf2 = Crypt::PBKDF2->new(
hash_class => 'HMACSHA2', #
iterations => 2048, #
output_len => 64, #
);
my $hash = $pbkdf2->generate($sentence,$salt);
print "$hash\n";
Gives
{X-PBKDF2}HMACSHA2+256:AAAIAA:bW5lbW9uaWM=:NLw67sZbhQYsPhrEYm9e5ruslS6/ivK1vDfICtCN07rb7RuBkQxAoZIyTG7sTmsob30JwoP64Fvzpjx6Cqc+KQ==
Passing this to the new() call works.