【问题标题】:How to run SCrypt in VSCode [duplicate]如何在 VSCode 中运行 SCrypt [重复]
【发布时间】:2021-09-22 05:22:27
【问题描述】:

我在执行由 Tony Garnock-Jones 制作的 SCrypt 时遇到问题

我不知道如何在 VSCode 调试器中初始化 scrypt_module_factory 以运行 scrypt.crypto_scrypt 函数,我不得不说我是 JS 新手。

这是我正在使用的代码,我想在库中使用此代码(SCrypt 的主文件):

var window = {};
var document = {};

const PASS = "test";
const SALT = "uf9tvxPoA4pwDXRDucQC19l30mN";
const COST = 1024;
const BLOCK_SIZE = 1;
const PARALLEL = 1;
var scrypt = scrypt_module_factory(t);

var t = scrypt.crypto_scrypt(PASS, SALT, COST, BLOCK_SIZE, PARALLEL, 15);
console.log(scrypt); //Output must be: "dc8b8d8e1d08b834f47f176f529266"

• 库:made by Tony Garnock-Jones

【问题讨论】:

    标签: javascript visual-studio-code scrypt


    【解决方案1】:

    这个库只在浏览器环境下运行,你可以在 Chrome 中调试它。如果你想在 VS Code 中调试,可以试试这个tutorial

    【讨论】:

    猜你喜欢
    • 2022-11-06
    • 2022-10-15
    • 2018-09-18
    • 2015-07-10
    • 1970-01-01
    • 2020-06-09
    • 2020-11-22
    • 2023-04-06
    • 2017-09-04
    相关资源
    最近更新 更多