src/Common/Service/Encrypt.php
public static function migrate($sCipher, $sOldKey, $sNewSalt = '')
    {
        require_once NAILS_CI_SYSTEM_PATH . 'libraries/Encrypt.php';

        $oEncryptCi = new \CI_Encrypt();
        $oEncrypt   = Factory::service('Encrypt');

        return $oEncrypt::encode(
            $oEncryptCi->decode(
                $sCipher,
                $sOldKey
            ),
            $sNewSalt
        );
    }
public static function migrate($sCipher, $sOldKey, $sNewSalt = '')
    {
        require_once NAILS_CI_SYSTEM_PATH . 'libraries/Encrypt.php';

        $oEncryptCi = new \CI_Encrypt();
        $oEncrypt   = Factory::service('Encrypt');

        return $oEncrypt::encode(
            $oEncryptCi->decode(
                $sCipher,
                $sOldKey
            ),
            $sNewSalt
        );
    }
public static function migrate ( $ sCipher , $ sOldKey , $ sNewSalt = '' ) { require_once NAILS_CI_SYSTEM_PATH . 'libraries/Encrypt.php' ; $ oEncryptCi = new \ CI_Encrypt ( ) ; $ oEncrypt = Factory :: service ( 'Encrypt' ) ; return $ oEncrypt :: encode ( $ oEncryptCi -> decode ( $ sCipher , $ sOldKey ) , $ sNewSalt ) ; }
Migrates a cipher from CI encrypt library, to Defuse\Crypto library

@param string $sCipher  The cipher to migrate
@param string $sOldKey  The key used to encode originally
@param string $sNewSalt The salt to add to the new key

@return string
Migrates a cipher from CI encrypt library to Defuse \ Crypto library