-
Notifications
You must be signed in to change notification settings - Fork 16
WIP: Change to cryptonite #8
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
Conversation
…t all of 'password', also wrote a test
…re it does outputs the same format hash
I'll be implementing the Note to self: also update |
I think this is looking really good. I did a brief read-through and the only thing I really noticed is the phantom parameter. It'd probably be easier to just declare an empty data type like data Scrypt and use it like the following: newtype PassHash a = PassHash
{ unPassHash :: Text
} deriving (Eq, Ord, Read, Show)
hashPass :: MonadIO m => Pass -> m (PassHash Scrypt)
hashPass = hashPassWithParams defaultParams |
Also, if you're interested, I'd like to give you commit rights to this repo (as well as the package on Hackage) to make it easier for you to make changes like this. It would also be helpful for you (and others?) if I were to ever go AWOL, especially if you're thinking of using this at work. |
Hmmm, true, better to not force pragmas on users.
Might be a good idea. Just to be sure. Not that I'll probably do a lot here, but who knows. |
Also @cdepillabout , have you any idea why this happens in the
|
I think it is due to doctest weirdness (basically, just not running in the right environment). The easiest way to fix it is to just upgrade to using cabal-doctest. For now you can ignore these failing tests. We can update to cabal-doctest in a future PR. |
Ok, I'll ignore the cabal tests. Also, I'm not a big fan of unnecessary abbreviation (like with |
In general, I feel the same way. In this specific instance, I was thinking that However, I don't feel that strongly either way. And most apps don't have huge amounts of code dealing with passwords, so using the full word "password" shouldn't have a huge affect on how verbose the code feels. So please feel free to change it. |
I've just given you commit access here on github. If you let me know your username on Hackage, I will give you access there as well. |
Thanks, I'll DM you my Hackage username on twitter. My twitter handle is |
…h in Scrypt.hashPassWithParams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good, I'm really happy with how it turned out.
I left a few comments, but none of these should be considered blockers.
I'd be happy if you wanted to merge this in, cut a release, and make an upload to hackage.
Yeah, just the added documentation for all the |
Yeah, that sounds good to me! |
Ok, I've implemented all the changes. Also added instances in EDIT: also wondering what |
@Vlix Okay, this looks good to me. Do you want to merge this in and make a release to Hackage? You probably don't need it, but here is my checklist for making a release to Hackage: |
Sure, let's merge this in. #10 can be closed then, I think. Your checklist doesn't seem to include uploading the documentation and doesn't use the upload candidate functionality. I've only uploaded to hackage with |
I normally tend to let Hackage build the docs for me, unless it can't, in which case I upload the documentation. Running However, if you're used to doing development with |
I took a last pass over the documentation for links etc. I'm also not sure what the proper etiquette is about the "Copyright" field at the top of the modules. Do I add my name there if I add (significantly) to the module? What if I just shuffle functions around? Should just the person be named that created the library? |
I'm also not sure about this. There is also the I'd be happy if you wanted to add your name in all these places, as well as the author/maintainer section in the Feel free to add your name, merge this in, and cut a new release. |
I don't mind maintaining the package as well. I've added my name in the appropriate places and will merge + upload later today. |
@Vlix I'd like to write a blog post about this update to the However, I imagine you'd be able to write a better post than me, given that you did all of the rewrite. Do you have a blog and would be willing to create a post about this? If not, no worries, I'll throw something together. |
@cdepillabout I don't have a blog, no. So you can go ahead and write something up. Maybe a good idea to let me do a read over and adjust it here and there if need be. |
Started the switch to more than just
scrypt
.scrypt
package to thecryptonite
packageSymbol
parameter to thePassHash
to keep it obvious which algorithm was usedscrypt
package.