1.0.0 • Published 10 years ago

phant-keychain-hex v1.0.0

Weekly downloads
6
License
GPL-3.0
Repository
github
Last release
10 years ago

phant-keychain-hex Build Status

hex id hash creation and validation module for phant

Getting Started

Install the module with: npm install phant-keychain-hex

var Keychain = require('phant-keychain-hex'),
    keys = Keychain({
      publicSalt: 'YOUR PUBLIC SALT',
      privateSalt: 'YOUR PRIVATE SALT',
      deleteSalt: 'YOUR DELETE SALT'
    });

// generate public, private, and delete keys
var id = '123abcdef321',
    pub = keys.publicKey(id), // ewY0EO7B45
    prv = keys.privateKey(id), // kPxgpEK91G
    del = keys.deleteKey(id); // PEr29DXa6N

// validation
console.log(keys.validatePrivateKey(pub, prv)); // true
console.log(keys.validateDeleteKey(pub, del)); // true

// getting the id from a hash
console.log(keys.getIdFromPublicKey(pub)); // 123abcdef321
console.log(keys.getIdFromPrivateKey(prv)); // 123abcdef321
console.log(keys.getIdFromDeleteKey(del)); // 123abcdef321

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2014 SparkFun Electronics. Licensed under the GPL v3 license.

@everything-registry/sub-chunk-2430@zalastax/nolb-phaphantphant-example-thermalprinterphantconfig-corcinephantconfig-dantestphantconfig-dht11_examplephantconfig-dmphantconfig-dmgenslerphantconfig-dmgensler1phantconfig-dsfphantconfig-dummyphantconfig-eduxphantconfig-efftronicsphantconfig-embeddedphantconfig-foobarphantconfig-fypphantconfig-gowdaphantconfig-gps_filesphantconfig-graffixphantconfig-graffix3phantconfig-hugophantconfig-iphantconfig-ingphantconfig-jphantconfig-jacophantconfig-jazphantconfig-jimbobphantconfig-khairulphantconfig-kodiakphantconfig-kpkophantconfig-lighthousephantconfig-llpphantconfig-micahfitzgeraldphantconfig-minamophantconfig-mmphantconfig-myphantphantconfig-neophytetestphantconfig-ontologixphantconfig-abphantconfig-airmonitorphantconfig-ambphantconfig-asphantconfig-aw2phantconfig-aw3phantconfig-aw4phantconfig-awnzphantconfig-bbphantconfig-beetestphantconfig-berryphantconfig-bigphantphantconfig-bobphantconfig-buenosairesphantconfig-cemalper4phantconfig-configaphantconfig-contestphantconfig-pablophantconfig-phantconfigboiler1phantconfig-phantconfigqegsphantconfig-phantconfigstuartsboiler1phantconfig-phantserverphantconfig-pifraphantconfig-pmdelpinophantconfig-qegsphantconfig-qegsstatsdphantconfig-random_dudephantconfig-rmhome1phantconfig-rmhome2phantconfig-rmhome3phantconfig-rmhome4phantconfig-ruisantoxphantconfig-samiphantconfig-satishphantconfig-solarflarephantconfig-t6tgdfgdsfphantjphantconfig-stuartphantconfig-stuartsboiler1phantconfig-test123phantconfig-testlampphantconfig-thewingerphantconfig-thingsphantconfig-toottoottwophantconfig-txt9phantconfig-v3phantconfig-webbyphantconfig-xbee1phantconfig-yooytootphantconfig-zachhilmanmatrixds1phantconfig-zh1phantdeftestphantconfig-dantest2phantconfig-deafultdudephantconfig-graffix2phantconfig-kodiak1phantconfig-kodiakmainphantconfig-kodiakserver1phantconfig-kodiakv2phantconfig-kodiakv3phantconfig-marko
1.0.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.0.1

10 years ago