in reply to xxHash Base64

If you are running a 64-bit build of perl, or one that has 64-bit integer math, then you could do the following:

use Digest::xxHash64 qw[ xxHash64 ]; use Mime::Base64; my $data = ...; ## from wherever my $xxH64B64 = encode_base64( pack 'Q', xxHash64( $data ) );

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice. Not understood.

Replies are listed 'Best First'.
Re^2: xxHash Base64
by timtowtdi (Sexton) on Jun 09, 2016 at 13:19 UTC
    That was it! Thank you very much!
    The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
Re^2: xxHash Base64
by Anonymous Monk on Jun 09, 2016 at 17:40 UTC

    Or if you're not using a 64-bit perl,

    encode_base64( pack('H*', xxhash64_hex($data, 0)) );

    Note that xxhash is not preimage-resistant, so comparing it to cryptographic hashes like MD5 and SHA1 is highly misleading.