You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pdd-order-api/vendor/mmeyer2k/dcrypt/tests/Pkcs7Test.php

20 lines
442 B
PHP

<?php
use Dcrypt\Pkcs7;
class Pkcs7Test extends PHPUnit_Framework_TestCase
{
public function testVectors()
{
$this->assertEquals(Pkcs7::pad('aaaabbbb', 3), "aaaabbbb\x01");
$this->assertEquals(Pkcs7::pad('aaaabbbb', 4), "aaaabbbb\x04\x04\x04\x04");
$this->assertEquals(Pkcs7::unpad("aaaabbbb\x01"), "aaaabbbb");
$this->assertEquals(Pkcs7::unpad("aaaabbbb\x04\x04\x04\x04"), "aaaabbbb");
}
}