Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meehow/go-django-hashers
Go implementation of password hashers used in Django
https://github.com/meehow/go-django-hashers
django go golang hashing password
Last synced: 3 months ago
JSON representation
Go implementation of password hashers used in Django
- Host: GitHub
- URL: https://github.com/meehow/go-django-hashers
- Owner: meehow
- License: gpl-3.0
- Created: 2017-12-28T19:43:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-31T13:54:15.000Z (almost 7 years ago)
- Last Synced: 2024-07-17T20:01:53.400Z (4 months ago)
- Topics: django, go, golang, hashing, password
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 29
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - go-django-hashers - Go implementation of password hashers used in Django (Go)
README
Go Django Hashers [![GoDoc](https://godoc.org/github.com/github.com/meehow/go-django-hashers?status.svg)](http://godoc.org/github.com/meehow/go-django-hashers) [![Go Report Card](https://goreportcard.com/badge/github.com/meehow/go-django-hashers)](https://goreportcard.com/report/github.com/meehow/go-django-hashers)
=================Go implementation of password hashers used in Django
Implemented hashers:
- `pbkdf2_sha256`
- `pbkdf2_sha1`
- `sha1`
- `md5`
- `unsalted_sha1`
- `unsalted_md5`Unsalted hashers are not allowed by `hashers.MakePassword` function. You can use them just with `hashers.CheckPassword`.
Hashers based on `bcrypt` are not implemented because `golang.org/x/crypto/bcrypt` is not yet compatible with Python's bcrypt.
By default `hashers.MakePassword` is using `pbkdf2_sha256` hasher.
If you really want to change it (i.e. when you want to have passwords compatible with Django 1.3 or older),
you can set `hashers.DefaultHasher` variable to one of supported hashers:```go
hashers.DefaultHasher = "sha1"
```Installation
------------```
go get -u github.com/meehow/go-django-hashers
```Usage
-----Usage is quite straightforward and simple.
Check example files:
- [check_password](examples/check_password.go)
- [make_password](examples/make_password.go)