This repository exists in order to provide easy functional testing for shssoichiro/zxcvbn-rs#83
- Go toolchain
- Rust toolchain
wasm-objdump
andwasm-snip
: see installation instructions
This project is made of two components:
core
, a Rust WASM library that calls thezxcvbn
function of thezxcvbn
crate. It exposes a functionstrength_for_password
consuming a string, and returns theguesses_log10
attribute of its entropy.client
, a Go app consuming the WASM-compiledcore
. It injects theunix_time_milliseconds_imported
in the environment, which is called within thezxcvbn
library, imported incore
'sCargo.toml
with thecustom_wasm_env
feature on.
From the root of the repository, run
make run
This should output the entropy score of the PASSWORD_TO_TEST
var defined in client/main.go
.
Not injecting the function, or importing the crate without the custom_wasm_env
will result in errors.