bbusschots / hsxkpasswd

A Perl module and terminal command for generating secure memorable passwords inspired by the fabulous XKCD web comic and Steve Gibson's Password Hay Stacks. This is the library that powers www.xkpasswd.net
http://www.bartb.ie/xkpasswd
BSD 2-Clause "Simplified" License
278 stars 48 forks source link

Add --show-entropy|-e option to display entropy stats. #21

Closed clsn closed 8 years ago

clsn commented 8 years ago

I kept wishing I could see the entropy scores, to get an idea of how good a password I was getting. So I added a parameter. Placed words in POD for it too. And didn't blow the spaces/tabs this time.

bbusschots commented 8 years ago

Another nice idea - thanks for implementing and documenting it.

I'm going to merge this pull request into the branch for the 3.7 release (assuming GitHub lets me do that because the pull is against master).

I'm considering making one small change to the feature though - having the passwords go to STDOUT (as they do now), but having the entropy stats going to STDERR. That way, they two distinct outputs can be more easily separated when scripting. From the terminal the two streams both go to the terminal, so there will be no visual difference for users. Can you think of any reason that might be a bad idea?

Thanks,

Bart.

bbusschots commented 8 years ago

@clsn I don't seem to be able to change the target of the pull request on my end - can you change it on yours? If so, could you change it to the 150813-v3.7-prep branch?

clsn commented 8 years ago

I think I have to open a new pull request. Just a sec.

bbusschots commented 8 years ago

Closing as this is now a duplicated of a merged request.

clsn commented 8 years ago

In re making the stats go to stderr... I considered doing that, actually, but then I figured that if you really didn't want the stats in your stdout you just wouldn't ask for them in the first place. The stats really are more or less the same whenever you run with the same settings, so you wouldn't need to do it all the time. Not that we couldn't do it that way, just didn't seem important to me at the time.