A web component that exposes the scrypt password-based KDF
First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install
to install your element's dependencies, then run polymer serve
to serve your element locally.
$ npm install blox-scrypt
$ polymer serve
$ polymer test
$ import 'blox-scrypt';
<blox-scrypt
password="secret!!"
result="{{result}}"
error="{{error}}"
salt="psv5lvsrnaw3">
</blox-scrypt>
<blox-scrypt
password="secret!!"
result="{{result}}"
error="{{error}}"
salt="psv5lvsrnaw3"
password-length=8
memoryCost=16384
blocksize=8
parallelization=1
dkLen=16
encoding='hex'></blox-scrypt>
<blox-scrypt id="bloxScrypt"></blox-scrypt>
<script>
this.$.bloxScrypt.scrypt('secret!!')
.then((hash) => {
// Do Something
})
.catch((err) => {
// Do Something
})
</script>