dev/core#2564 - PhpseclibCipherSuite - Support v1 constants
authorTim Otten <totten@civicrm.org>
Mon, 26 Apr 2021 21:05:45 +0000 (14:05 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 26 Apr 2021 21:05:45 +0000 (14:05 -0700)
Civi/Crypto/PhpseclibCipherSuite.php

index 5bb6c5dc1a9231388078600f4fbf68633fd6559d..d7fdf09494f169941cb7e46cd437999d17436453 100644 (file)
@@ -48,9 +48,9 @@ class PhpseclibCipherSuite implements CipherSuiteInterface {
     }
     elseif (class_exists('Crypt_AES')) {
       // phpseclib v1
-      $this->ciphers['aes-cbc'] = new \Crypt_AES(\Crypt_AES::CRYPT_MODE_CBC);
+      $this->ciphers['aes-cbc'] = new \Crypt_AES(CRYPT_MODE_CBC);
       $this->ciphers['aes-cbc']->setKeyLength(256);
-      $this->ciphers['aes-ctr'] = new \Crypt_AES(\Crypt_AES::CRYPT_MODE_CTR);
+      $this->ciphers['aes-ctr'] = new \Crypt_AES(CRYPT_MODE_CBC);
       $this->ciphers['aes-ctr']->setKeyLength(256);
     }
     else {