-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* AesExp.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @category Dcrypt | ||
* @package Dcrypt | ||
* @author Michael Meyer (mmeyer2k) <m.meyer2k@gmail.com> | ||
* @license http://opensource.org/licenses/MIT The MIT License (MIT) | ||
* @link https://github.com/mmeyer2k/dcrypt | ||
*/ | ||
|
||
namespace Dcrypt; | ||
|
||
/** | ||
* Symmetric AES-256-CBC encryption functions powered by OpenSSL. This class | ||
* will throw an exception on checksum inequality. | ||
* | ||
* @category Dcrypt | ||
* @package Dcrypt | ||
* @author Michael Meyer (mmeyer2k) <m.meyer2k@gmail.com> | ||
* @license http://opensource.org/licenses/MIT The MIT License (MIT) | ||
* @link https://github.com/mmeyer2k/dcrypt | ||
* @link https://apigen.ci/github/mmeyer2k/dcrypt/namespace-Dcrypt.html | ||
*/ | ||
class AesExp extends Aes | ||
{ | ||
|
||
/** | ||
* Throw an invalid checksum exception. | ||
*/ | ||
protected static function invalidChecksum() | ||
{ | ||
$e = 'Decryption can not proceed due to invalid cyphertext checksum.'; | ||
throw new \InvalidArgumentException($e); | ||
} | ||
|
||
} | ||
<?php | ||
|
||
/** | ||
* AesExp.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @category Dcrypt | ||
* @package Dcrypt | ||
* @author Michael Meyer (mmeyer2k) <m.meyer2k@gmail.com> | ||
* @license http://opensource.org/licenses/MIT The MIT License (MIT) | ||
* @link https://github.com/mmeyer2k/dcrypt | ||
*/ | ||
|
||
namespace Dcrypt; | ||
|
||
/** | ||
* Symmetric AES-256-CBC encryption functions powered by OpenSSL. This class | ||
* will throw an exception on checksum inequality. | ||
* | ||
* @category Dcrypt | ||
* @package Dcrypt | ||
* @author Michael Meyer (mmeyer2k) <m.meyer2k@gmail.com> | ||
* @license http://opensource.org/licenses/MIT The MIT License (MIT) | ||
* @link https://github.com/mmeyer2k/dcrypt | ||
* @link https://apigen.ci/github/mmeyer2k/dcrypt/namespace-Dcrypt.html | ||
*/ | ||
class AesExp extends Aes | ||
{ | ||
|
||
/** | ||
* Throw an invalid checksum exception. | ||
*/ | ||
protected static function invalidChecksum() | ||
{ | ||
$e = 'Decryption can not proceed due to invalid cyphertext checksum.'; | ||
throw new \InvalidArgumentException($e); | ||
} | ||
|
||
} |