Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dchest/scrypt-async-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: dchest/scrypt-async-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: sync
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on May 13, 2015

  1. Add synchronous way to use scrypt.

    Now there are three general ways to call scrypt:
    
    scrypt(password, salt, logN, r, dkLen, interruptStep, callback, [encoding])
    
    Derives a key from password and salt and calls callback with derived key
    as the only argument. The calculations are interrupted with zero
    setTimeout at the given interruptSteps to avoid freezing the browser.
    Encoding is optional.
    
    scrypt(password, salt, logN, r, dkLen, callback, [encoding])
    
    Same as first, but uses default interruptStep (1000). Encoding is
    optional.
    
    scrypt(password, salt, logN, r, dkLen, [encoding]) -> returns result
    
    Synchronous: doesn't interrupt calculations and returns the result
    instead of passing it to callback. Encoding is optional. Perfect for use
    in web workers.
    dchest committed May 13, 2015
    Configuration menu
    Copy the full SHA
    7f0be5b View commit details
    Browse the repository at this point in the history
  2. Little tweaks.

    dchest committed May 13, 2015
    Configuration menu
    Copy the full SHA
    26bbe16 View commit details
    Browse the repository at this point in the history
  3. Optimize for zero or negative interruptStep.

    If interruptStep is <= 0, avoid calling setTimeout, and calculate result
    immediately, passing it to callback.
    dchest committed May 13, 2015
    Configuration menu
    Copy the full SHA
    c284e86 View commit details
    Browse the repository at this point in the history
  4. Rebuild minified version.

    dchest committed May 13, 2015
    Configuration menu
    Copy the full SHA
    1762d5e View commit details
    Browse the repository at this point in the history
Loading