Basraah 2c68f485e2 Upgrade Mumble password hashing to bcrypt (#671)
Added transition to bcrypt-sha256 hashing for mumble passwords.
All new passwords will be hashed by bcrypt-sha256. The existing SHA-1
hashes will continue to work as a fallback for legacy password hashes.
2017-01-25 15:10:07 -05:00

16 lines
546 B
Python

from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.db import models
@python_2_unicode_compatible
class MumbleUser(models.Model):
user = models.OneToOneField('auth.User', related_name='mumble', null=True)
username = models.CharField(max_length=254, unique=True)
pwhash = models.CharField(max_length=80)
hashfn = models.CharField(max_length=20, default='sha1')
groups = models.TextField(blank=True, null=True)
def __str__(self):
return self.username