@seedalpha/signature

    1.0.11 • Public • Published

    seed-signature Ψ

    Functions for generating, verifying keyed hash to protect SeedAlpha's services which are exposed to public traffic.

    Changelog

    1.0.1

    • bugfix on missing context binding

    1.0.0

    • project init

    Usage

      var Signature = require('seed-signature');
      var signature = new Signature({
        secret:     'yoursecret',   // required
        expiryTime: 10 * 60 * 1000  // optional, default 5 minutes
      });
      var rs = signature.generate();
      /**
       * {
       *   timestamp: 1453792759859,
       *   token:     '0099aazz',
       *   signature: '8f16771f9f8851b26f4d460fa17de93e2711c7e51337cb8a608a0f81e1c1b6ae'
       * }
       */
      var verified = signature.verify(rs.timestamp, rs.token, rs.signature);

    Author

    Marvin Lam lam@seedalpha.net

    License

    Copyright © 2016 SeedAlpha, All rights reserved.

    Install

    npm i @seedalpha/signature

    DownloadsWeekly Downloads

    5

    Version

    1.0.11

    License

    SEE LICENSE IN LICENSE.md

    Unpacked Size

    6.78 kB

    Total Files

    5

    Last publish

    Collaborators

    • tom.raggett.trcuk.com
    • ac_inc