X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=blobdiff_plain;f=CryptLib%2FCipher%2FBlock%2FMode%2FECB.php;fp=CryptLib%2FCipher%2FBlock%2FMode%2FECB.php;h=6adcb1f25237cdb1df06f260763f422df7c44766;hp=0000000000000000000000000000000000000000;hb=14d4f286d33b631a93207e4d13086c0a3bc0df12;hpb=c9e082da5cc662b64a74d3770f13d1270068678f diff --git a/CryptLib/Cipher/Block/Mode/ECB.php b/CryptLib/Cipher/Block/Mode/ECB.php new file mode 100644 index 0000000..6adcb1f --- /dev/null +++ b/CryptLib/Cipher/Block/Mode/ECB.php @@ -0,0 +1,50 @@ + + * @copyright 2011 The Authors + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version Build @@version@@ + */ + +namespace CryptLib\Cipher\Block\Mode; + +/** + * The ECB (Electronic CodeBook) mode implementation + * + * @category PHPCryptLib + * @package Cipher + * @subpackage Block + * @author Anthony Ferrara + */ +class ECB extends \CryptLib\Cipher\Block\AbstractMode { + + /** + * Decrypt the data using the supplied key, cipher and initialization vector + * + * @param string $data The data to decrypt + * + * @return string The decrypted data + */ + protected function decryptBlock($data) { + return $this->cipher->decryptBlock($data); + } + + /** + * Encrypt the data using the supplied key, cipher and initialization vector + * + * @param string $data The data to encrypt + * + * @return string The encrypted data + */ + protected function encryptBlock($data) { + return $this->cipher->encryptBlock($data); + } + +}