Lines Matching refs:des

15  *    $des = new \phpseclib3\Crypt\TripleDES('ctr');
17 * $des->setKey('abcdefghijklmnopqrstuvwx');
25 * echo $des->decrypt($des->encrypt($plaintext));
106 private $des;
142 // This three $des'es will do the 3CBC work (if $key > 64bits)
143 $this->des = [
150 $this->des[0]->disablePadding();
151 $this->des[1]->disablePadding();
152 $this->des[2]->disablePadding();
179 $this->cipher_name_openssl_ecb = 'des-ede3';
181 $this->cipher_name_openssl = $mode == 'ecb' ? 'des-ede3' : 'des-ede3-' . $mode;
199 $this->des[0]->setIV($iv);
200 $this->des[1]->setIV($iv);
201 $this->des[2]->setIV($iv);
264 $this->des[0]->setKey(substr($key, 0, 8));
265 $this->des[1]->setKey(substr($key, 8, 8));
266 $this->des[2]->setKey(substr($key, 16, 8));
284 return $this->des[2]->encrypt(
285 $this->des[1]->decrypt(
286 $this->des[0]->encrypt(
307 $this->des[0]->decrypt(
308 $this->des[1]->encrypt(
309 $this->des[2]->decrypt(
327 * echo $des->encrypt(substr($plaintext, 0, 8));
328 * echo $des->encrypt(substr($plaintext, 8, 8));
331 * echo $des->encrypt($plaintext);
338 * $des->encrypt(substr($plaintext, 0, 8));
339 * echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8)));
342 * echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8)));
361 $this->des[0]->enableContinuousBuffer();
362 $this->des[1]->enableContinuousBuffer();
363 $this->des[2]->enableContinuousBuffer();
379 $this->des[0]->disableContinuousBuffer();
380 $this->des[1]->disableContinuousBuffer();
381 $this->des[2]->disableContinuousBuffer();
404 // (only) if 3CBC is used we have, of course, to setup the $des[0-2] keys also separately.
406 $this->des[0]->setupKey();
407 $this->des[1]->setupKey();
408 $this->des[2]->setupKey();
410 // because $des[0-2] will, now, do all the work we can return here
429 $this->des[0]->setPreferredEngine($engine);
430 $this->des[1]->setPreferredEngine($engine);
431 $this->des[2]->setPreferredEngine($engine);