Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secretz expecting odd output #114

Open
Sequoia opened this issue Feb 20, 2015 · 0 comments
Open

Secretz expecting odd output #114

Sequoia opened this issue Feb 20, 2015 · 0 comments

Comments

@Sequoia
Copy link
Contributor

Sequoia commented Feb 20, 2015

migrated from nodeschool/discussions#324
/cc @CamiloMM @jedireza

I think the expected result of secretz is wrong:
console screenshot

So while my format is

MD5_1 PATH_1
MD5_2 PATH_2

It seems to weirdly expect

MD5_1MD5_2 PATH_1
 PATH_2

I'm on Win7 x64 and stream-adventure@2.4.3, npm@1.4.13, node@v0.11.13.

In case my code triggered this bug, here's what it was:

var crypto = require('crypto');
var zlib = require('zlib');
var tar = require('tar');
var through = require('through');

var decipher = crypto.createDecipher(process.argv[2], process.argv[3]);
var gunzip = zlib.createGunzip();
var parser = tar.Parse();

parser.on('entry', function(entry) {
    if (entry.type !== 'File') return;
    var hasher = crypto.createHash('md5', { encoding: 'hex' });
    entry.pipe(hasher).pipe(through(function(md5) {
        console.log(md5 + ' ' + entry.path);
    }));
});

process.stdin
    .pipe(decipher)
    .pipe(gunzip)
    .pipe(parser);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant