mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 21:17:53 +00:00
PHP Secure Communications Library
359e38b4d4
$buffer['encrypted'] (which is always empty) should be $buffer['ciphertext'] or buffered stream will get corrupt... Example: define('CRYPT_AES_MODE',CRYPT_AES_MODE_INTERNAL);//in MODE_MCRYPT all is fine $aes = new Crypt_AES(CRYPT_AES_MODE_CTR); $aes->setKey(':-8'); $aes->enableContinuousBuffer(); $plaintext = ':-):-):-):-):-):-)'; for($i=0; $i<strlen($plaintext); $i++) { echo $aes->Decrypt($aes->Encrypt($plaintext[$i])); } Output: :-):-):-):-):-):-( Expected: :-):-):-):-):-):-) After Bugfix, output is: :-):-):-):-):-):-) |
||
---|---|---|
phpseclib | ||
tests | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
AUTHORS | ||
composer.json | ||
LICENSE | ||
phpunit.xml.dist | ||
README.md |
phpseclib - PHP Secure Communications Library
MIT-licensed pure-PHP implementations of an arbitrary-precision integer arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael, AES, SSH-1, SSH-2, SFTP, and X.509
PEAR Channel: [phpseclib.sourceforge.net](http://phpseclib.sourceforge.net/pear.htm)