Skip to content

Commit

Permalink
Merge 0944a5a into 4fc9842
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Nov 9, 2018
2 parents 4fc9842 + 0944a5a commit e7e5ef6
Show file tree
Hide file tree
Showing 22 changed files with 67,868 additions and 36,959 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["dynamic-import-webpack"]
}
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"browser": true,
"node": true
},
"parser": "babel-eslint",
"extends": "eslint:recommended",
"rules": {
"indent": [
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
*.log
coverage
.nyc_output
overflow
data
scripts
Expand Down
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ node_js:
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- gcc-4.8
- g++-4.8

before_script:
- npm install

script:
- npm run lint
- istanbul cover -x **/lib/** ./node_modules/mocha/bin/_mocha test/keys.js --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
- npm run coverage
- npm run coveralls
111 changes: 111 additions & 0 deletions dist/1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{

/***/ 181:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrypt", function() { return scrypt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__wbindgen_throw", function() { return __wbindgen_throw; });
/* harmony import */ var _scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(182);
/* tslint:disable */


let cachedTextEncoder = new TextEncoder('utf-8');

let cachegetUint8Memory = null;
function getUint8Memory() {
if (cachegetUint8Memory === null || cachegetUint8Memory.buffer !== _scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* memory */ "d"].buffer) {
cachegetUint8Memory = new Uint8Array(_scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* memory */ "d"].buffer);
}
return cachegetUint8Memory;
}

function passStringToWasm(arg) {

const buf = cachedTextEncoder.encode(arg);
const ptr = _scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* __wbindgen_malloc */ "c"](buf.length);
getUint8Memory().set(buf, ptr);
return [ptr, buf.length];
}

let cachedTextDecoder = new TextDecoder('utf-8');

function getStringFromWasm(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory().subarray(ptr, ptr + len));
}

let cachedGlobalArgumentPtr = null;
function globalArgumentPtr() {
if (cachedGlobalArgumentPtr === null) {
cachedGlobalArgumentPtr = _scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* __wbindgen_global_argument_ptr */ "b"]();
}
return cachedGlobalArgumentPtr;
}

let cachegetUint32Memory = null;
function getUint32Memory() {
if (cachegetUint32Memory === null || cachegetUint32Memory.buffer !== _scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* memory */ "d"].buffer) {
cachegetUint32Memory = new Uint32Array(_scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* memory */ "d"].buffer);
}
return cachegetUint32Memory;
}
/**
* @param {string} arg0
* @param {string} arg1
* @param {number} arg2
* @param {number} arg3
* @param {number} arg4
* @param {number} arg5
* @returns {string}
*/
function scrypt(arg0, arg1, arg2, arg3, arg4, arg5) {
const [ptr0, len0] = passStringToWasm(arg0);
const [ptr1, len1] = passStringToWasm(arg1);
const retptr = globalArgumentPtr();
try {
_scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* scrypt */ "e"](retptr, ptr0, len0, ptr1, len1, arg2, arg3, arg4, arg5);
const mem = getUint32Memory();
const rustptr = mem[retptr / 4];
const rustlen = mem[retptr / 4 + 1];

const realRet = getStringFromWasm(rustptr, rustlen).slice();
_scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* __wbindgen_free */ "a"](rustptr, rustlen * 1);
return realRet;


} finally {
_scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* __wbindgen_free */ "a"](ptr0, len0 * 1);
_scrypt_wasm_bg__WEBPACK_IMPORTED_MODULE_0__[/* __wbindgen_free */ "a"](ptr1, len1 * 1);

}

}

function __wbindgen_throw(ptr, len) {
throw new Error(getStringFromWasm(ptr, len));
}



/***/ }),

/***/ 182:
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// Instantiate WebAssembly module
var wasmExports = __webpack_require__.w[module.i];

// export exports from WebAssembly module
module.exports = wasmExports;
// exec imports from WebAssembly module (for esm order)
/* harmony import */ var m0 = __webpack_require__(181);


// exec wasm module
wasmExports["f"]()

/***/ })

}]);
1 change: 1 addition & 0 deletions dist/1.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added dist/552061497d88ed1d6a12.module.wasm
Binary file not shown.

0 comments on commit e7e5ef6

Please sign in to comment.