コード例 #1
0
ファイル: UtilityTest.php プロジェクト: camcima/dukpt-php
 public function testXorHexString()
 {
     $input = "0123456789ABCDEF";
     $mask = "C0C0C0C000000000C0C0C0C000000000";
     $expected = "C1E385A789ABCDEF";
     $actual = Utility::xorHexString($input, $mask);
     $this->assertEquals($expected, $actual);
 }
コード例 #2
0
ファイル: ChineseTest.php プロジェクト: camcima/dukpt-php
 public function testXorHexString()
 {
     $input = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
     $mask = "C0C0C0C000000000C0C0C0C000000000";
     $expected = "3F3F3F3FFFFFFFFF3F3F3F3FFFFFFFFF";
     $actual = Utility::xorHexString($input, $mask);
     $this->assertEquals($expected, $actual);
 }