Skip to content

A web component that exposes the scrypt password-based KDF

License

Notifications You must be signed in to change notification settings

EOSBlox/blox-scrypt

Repository files navigation

<blox-scrypt>

Build Status

A web component that exposes the scrypt password-based KDF

Install the Polymer-CLI

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.

Install blox-scrypt

$ npm install blox-scrypt

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Import

$ import 'blox-scrypt';

Basic Use

<blox-scrypt
    password="secret!!"
    result="{{result}}"
    error="{{error}}"
    salt="psv5lvsrnaw3">
</blox-scrypt>

Advanced Use

<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>

Javascript Use

<blox-scrypt id="bloxScrypt"></blox-scrypt>
<script>
    this.$.bloxScrypt.scrypt('secret!!')
    .then((hash) => {
        // Do Something
    })
    .catch((err) => {
        // Do Something
    })
</script>