You are here

function Braintree_DigestTest::testBuiltInHmacSha1 in Commerce Braintree 7

File

braintree_php/tests/unit/DigestTest.php, line 24

Class

Braintree_DigestTest

Code

function testBuiltInHmacSha1() {
  Braintree_Configuration::privateKey(str_repeat(chr(0xaa), 80));
  $message = 'Test Using Larger Than Block-Size Key - Hash Key First';
  $d = Braintree_Digest::_builtInHmacSha1($message, Braintree_Configuration::privateKey());
  $this
    ->assertEquals('aa4ae5e15272d00e95705637ce8a3b55ed402112', $d);
}