小编har*_*ing的帖子

在项目中包含Paragonie Halite没有找到变量和函数

我在Windows上为PHP 7安装了libsodium,我正在用PHPStorm开发我的项目.我还安装了Paragonie的Halite,如果没有正确安装libsodium扩展,甚至无法安装.IDE也会找到使用过的函数,当点击变量等时,它会打开libsodium的拟合文件.

但不幸的是在我的设置中我收到以下错误:

Uncaught Error: Undefined constant 'Sodium\CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE' in C:\Server\nginx-1.11.1\html\mywebsite\vendor\paragonie\halite\src\KeyFactory.php:344
Run Code Online (Sandbox Code Playgroud)

我的index.php文件如下所示:

    <?php
    require_once 'vendor/autoload.php';

    spl_autoload_register(function ($class) {
        require_once $class . '.php';
    });

    $router = new AltoRouter();

    $router->setBasePath('/' . basename(__DIR__));

    require_once 'config/routes.php';

    $match = $router->match();

    $GLOBALS['db'] = new \config\database(true, null);

    try
    {
        if ($match) {
            $routeController = new Modules\Core\RouteController($match);
            echo $routeController->bootstrap();
        }
    }
    catch (Exception $ex)
    {
        //@todo log every Exception
    }
Run Code Online (Sandbox Code Playgroud)

我也用Jquery提交我的表单,它成功地执行了以下函数(找不到libsodium函数/变量):

public function hash($password)
{
    $this->setEncryptionKey();
    return Password::hash(
        $password, // string
        $this->encryption_key      // \ParagonIE\Halite\Symmetric\EncryptionKey
    );
}

public function check($stored_hash, …
Run Code Online (Sandbox Code Playgroud)

php php-extension libsodium

2
推荐指数
1
解决办法
498
查看次数

ArangoDB创建文档导致空插入

我正在使用" https://github.com/yojimbo87/ArangoDB-NET在我的项目中 ",尝试从xml文件导入数据.调试代码向我显示值是在对象内部,但是当在集合中创建文档时,它会导致空插入.

这是我的createDocument方法:

static string createDocument(ADatabase db, string collection, object dataType)
    {
        var createDocumentResult = db.Document.WaitForSync(false).Create(collection, dataType);
        string key = "";
        if (createDocumentResult.Success)
        {
            key = createDocumentResult.Value.String("_key");
        }
        return key;
    }
Run Code Online (Sandbox Code Playgroud)

这是我的课程:

class Artist
{
    public int Id;
    public string Name;
    public bool Extra;
}

class ReleaseArtist
{
    public string ReleaseKey;
    public string ArtistKey;
}

class Format
{
    public string Name;
}

class ReleaseFormat
{
    public string ReleaseKey;
    public string FormatKey;
}

class Genre
{
    public string Name; …
Run Code Online (Sandbox Code Playgroud)

.net c# arangodb

1
推荐指数
1
解决办法
170
查看次数

标签 统计

.net ×1

arangodb ×1

c# ×1

libsodium ×1

php ×1

php-extension ×1