Clone wiki

pbkdf2 / Home

pbkdf2.go

Secure password hash generation for Go.

Generating password hash

   ph := pbkdf2.HashPassword("mypass")
   fmt.Printf("Salt %X, Hash %X\n", ph.Salt, ph.Hash)

Matching passwords

    if(!pbkdf2.MatchPassword("mywrongpass", ph)) {
        panic("Wrong password")
    }

Updated