Commit | Line | Data |
---|---|---|
14d4f286 S |
1 | <?php |
2 | /** | |
3 | * A packing mode implementation for no padding | |
4 | * | |
5 | * This is provided for completeness only. Do not use this with actual ciphers | |
6 | * | |
7 | * PHP version 5.3 | |
8 | * | |
9 | * @category PHPCryptLib | |
10 | * @package Encryption | |
11 | * @subpackage PackingMode | |
12 | * @author Anthony Ferrara <ircmaxell@ircmaxell.com> | |
13 | * @copyright 2011 The Authors | |
14 | * @license http://www.opensource.org/licenses/mit-license.html MIT License | |
15 | * @version Build @@version@@ | |
16 | */ | |
17 | ||
18 | namespace CryptLib\Encryption\PackingMode; | |
19 | ||
20 | /** | |
21 | * A packing mode implementation for no padding | |
22 | * | |
23 | * This is provided for completeness only. Do not use this with actual ciphers | |
24 | * | |
25 | * @category PHPCryptLib | |
26 | * @package Encryption | |
27 | * @subpackage PackingMode | |
28 | * @author Anthony Ferrara <ircmaxell@ircmaxell.com> | |
29 | */ | |
30 | class None implements \CryptLib\Encryption\PackingMode { | |
31 | ||
32 | /** | |
33 | * Pad the string to the specified size | |
34 | * | |
35 | * @param string $string The string to pad | |
36 | * @param int $blockSize The size to pad to | |
37 | * | |
38 | * @return string The padded string | |
39 | */ | |
40 | public function pad($string, $blockSize = 32) { | |
41 | return $string; | |
42 | } | |
43 | ||
44 | /** | |
45 | * Strip the padding from the supplied string | |
46 | * | |
47 | * @param string $string The string to trim | |
48 | * | |
49 | * @return string The unpadded string | |
50 | */ | |
51 | public function strip($string) { | |
52 | return $string; | |
53 | } | |
54 | ||
55 | } |