News for hackers. Stuff that matters.
Re:Copy and paste-friendly Go crypto by elithrar on Saturday July 16, 2016 @07:57PM (#12108358)
> I know! That's why I am asking. I have found surprisingly difficult to find a package that does this.

scrypt, with an output length that suits your use-case? (as Filippo points out)

Note: I wrote https://github.com/elithrar/simple-scrypt, which wraps Go's scrypt package and gives it a friendlier API (mimicking the bcrypt one). Handles salt generation for you and has sane default parameters, outputting a 32-byte derived key by default. e.g.

    func deriveKey(key []byte) ([]byte, error) {
        return scrypt.GenerateFromPassword([]byte("plaintext"), scrypt.DefaultParams)
    }
You can pass your own params, or modify the defaults to get a different key length depending on your use-case.
Re:Copy and paste-friendly Go crypto by dawkins on Saturday July 16, 2016 @08:01PM (#12108367)
yes, that is what I was looking for. Thank you!