Net-Braintree

 view release on metacpan or  search on metacpan

t/digest.t  view on Meta::CPAN

use lib qw(lib t/lib);
use Test::More;

my $query_string = "one=1&two=2&http_status=200";
my $private_key = "integration_private_key";
my $expected_hash = "3970ae558c51cf6f54340b5b1842d47ba1f5a19e";

use Net::Braintree::Digest qw(hexdigest hexdigest_256);
is(hexdigest($private_key, $query_string), $expected_hash, "Braintree digest works");

is(hexdigest_256("secret-key", "secret-message"),  "68e7f2ecab71db67b1aca2a638f5122810315c3013f27c2196cd53e88709eecc", "Braintree digest 256 works");

done_testing();



( run in 1.073 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )