I am trying to convert the following in Perl to PowerShell, I am stuck on the MD5 Digest and Create.
timestamp=1283473470
key='this-is-my-key'
secret='secret'
perl -e "use Digest::MD5 qw(md5 md5_hex); print md5_hex('$key' . '$secret' . $timestamp);"
For testing purposes I am setting the time stamp to a static number. That way I can compare what Perl says and what PowerShell says. I'v tried out a few MD5 and [System.Security.Cryptography.HashAlgorithm] attempts but so far I have manged to little more than confuse myself.
In Perl....
> perl -e "use Digest::MD5 qw(md5 md5_hex); print md5_hex('this-is-my-key' . 'secret' . '1283473470');"
> a135923fb8e579463f312b69528d243c
In PowerShell
>_ 'this-is-my-key.secret.1283473470' | Get-Hash
Algorithm: MD5
Path :
HashString : 04BF4CA4BF3E34C83F0B11970205580D