Skip to content

Commit

Permalink
New version 1.0.3:
Browse files Browse the repository at this point in the history
- Bugs fixed (h2non#5, h2non#6, h2non#8, h2non#10, h2non#11)
- Added package version property to the exposed Hashes Object
- Added test cases
- Updated CLI script utility (bin/hashes)
  • Loading branch information
tomas.aparicio authored and tomas.aparicio committed Apr 10, 2013
1 parent ffd14b5 commit 13195f7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 13 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ See `client/benchmark.html` for client-side.

## Changelog

* `1.0.3`
- Bugs fixed (#5, #6, #8, #10, #11)
- Added package version property to the exposed Hashes Object
- Added test cases
- Updated CLI script utility (bin/hashes)
* `1.0.2`
- Performance improvements and minimal refactor (length property caching, literal notation)
- Available from Bower package manager
Expand Down Expand Up @@ -210,8 +215,8 @@ See `client/benchmark.html` for client-side.

## TODO

* Performance tests with JSLitmus
* Testing
* Performance benchmarking
* Testing (in process)
* CLI support

## Authors
Expand All @@ -220,6 +225,10 @@ See `client/benchmark.html` for client-side.

* [Tomas Aparicio](https://github.com/h2non/)

### Library contributors

* [C. Scott Ananian](https://github.com/cscott)

### Original algorithm authors

* [Paul Johnston](http://pajhome.org.uk/crypt/md5/)
Expand Down
11 changes: 6 additions & 5 deletions bin/hashes.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/usr/bin/env node
/**
* A simple CLI for jsHashes to simplify common taks :)
* Simple CLI to simplify common tasks :)
* @beta
*/
var Hashes = require('../hashes'),
args = process.argv,
usage, options;

// Usage dialog
usage = [
'jsHashes 1.0.2'
'jsHashes 1.0.3'
, ''
, 'Usage:'
, ' hashes [option] [string]'
Expand Down Expand Up @@ -58,7 +59,7 @@ function die (str) {
}

// process algorithm
function process() {
function procesAlgorithm() {
var algorithm = args[0].split('-')[0].toUpperCase(),
encoding = args[0].split('-')[1],
string = args.slice(1).join(''),
Expand All @@ -70,7 +71,7 @@ function process() {
output = instance[encoding](string);
}
} else {
output = 'Algorithm not supported. See the help for list of available options.'
output = 'Algorithm not supported. Type help to see the list of available options.'
}
return output;
}
Expand All @@ -82,4 +83,4 @@ if (args[0] === '-h' || args[0] === '--help' || args[0] === 'help' || args.lengt
die(usage);
}

die(process());
die(procesAlgorithm());
7 changes: 6 additions & 1 deletion hashes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @class Hashes
* @author Tomas Aparicio <tomas@rijndael-project.com>
* @license New BSD (see LICENSE file)
* @version 1.0.2 - 25/03/2013
* @version 1.0.3
*
* Algorithms specification:
*
Expand Down Expand Up @@ -250,6 +250,11 @@
}

Hashes = {
/**
* @property {String} version
* @readonly
*/
VERSION : '1.0.3',
/**
* @member Hashes
* @class Base64
Expand Down
Loading

0 comments on commit 13195f7

Please sign in to comment.