-
Notifications
You must be signed in to change notification settings - Fork 103
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
#56 Use 16 hex characters in salt #57
Conversation
- The current salt uses 15 hex characters and the new-line character on *nix, and 14 hex characters and carriage-return plus new-line characters on Windows. Stripping both characters in salt-generation makes the code cross-platform and eliminates the OpenSSL warning that would otherwise be printed.
Because #58 already suppresses warnings, a way to make a backwards-compatible change that would fix the cross-platform issues described in #56 (i.e. make the salt-derivation work identical on both *nix and Windows) would be to substitute |
@dirkhas Thanks for the PR, looks good. Hopefully it gets released soon. |
why not tail -c 17 ? |
@ricardo0624 The salt needs to be exactly 16 characters. |
@leclairmael tail -c 17 is exactly 16 characters. op ,tail -c 16 is just 15 characters. |
@ricardo0624 Try for example |
@dirkhas Sorry for the radio silence on all these issues...thank you for noticing the inconsistency and for providing the fix! What's the proposed workflow for re-encrypting in this case? Once I can sort out easy directions for people to migrate, I'll get this merged and will cut a new release once I've gone through the rest of the backlog. |
I guess this would be it after updating transcrypt:
|
Actually, it's not quite that simple since the repository's configured clean filter script will have to be updated, and transcrypt won't do that if the repo is dirty. Need to think about this a bit more, as I think this is the first real backward incompatible change the project has needed. If you have a working set of steps, please do let me know... |
For posterity, flushing the credentials first and then re-configuring the repo before adding the files does the trick:
|
*nix, and 14 hex characters and carriage-return plus new-line characters
on Windows. Stripping both characters in salt-generation makes
the code cross-platform and eliminates the OpenSSL warning that would
otherwise be printed.