src/Crypt/Mcrypt.php
protected function createCipher($key)
    {
        $cipher = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, '');

        if ($cipher === false || $cipher < 0) {
            throw new InternalServerError(
                T('mcrypt_module_open with {cipher}', ['cipher' => $cipher])
            );
        }

        mcrypt_generic_init($cipher, $this->formatKey($key), $this->iv);

        return $cipher;
    }
protected function createCipher($key)
    {
        $cipher = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, '');

        if ($cipher === false || $cipher < 0) {
            throw new InternalServerError(
                T('mcrypt_module_open with {cipher}', ['cipher' => $cipher])
            );
        }

        mcrypt_generic_init($cipher, $this->formatKey($key), $this->iv);

        return $cipher;
    }
protected function createCipher ( $ key ) { $ cipher = mcrypt_module_open ( MCRYPT_BLOWFISH , '' , MCRYPT_MODE_CBC , '' ) ; if ( $ cipher === false || $ cipher < 0 ) { throw new InternalServerError ( T ( 'mcrypt_module_open with {cipher}' , [ 'cipher' => $ cipher ] ) ) ; } mcrypt_generic_init ( $ cipher , $ this -> formatKey ( $ key ) , $ this -> iv ) ; return $ cipher ; }
创建cipher

@param string $key 私钥
@throws InternalServerError
@return resource
创建cipher