core.bones.passwordBone

Module Contents

Classes

passwordBone

A bone holding passwords.

Functions

pbkdf2(password, salt, iterations=1001, keylen=42)

An implementation of PBKDF2 (http://wikipedia.org/wiki/PBKDF2)

core.bones.passwordBone.pbkdf2(password, salt, iterations=1001, keylen=42)

An implementation of PBKDF2 (http://wikipedia.org/wiki/PBKDF2)

Mostly based on the implementation of https://github.com/mitsuhiko/python-pbkdf2/blob/master/pbkdf2.py

Copyright
  1. Copyright 2011 by Armin Ronacher.

License

BSD, see LICENSE for more details.

class core.bones.passwordBone.passwordBone

Bases: viur.core.bones.stringBone

A bone holding passwords. This is always empty if read from the database. If its saved, its ignored if its values is still empty. If its value is not empty, its hashed (with salt) and only the resulting hash will be written to the database

type = password
saltLength = 13
minPasswordLength = 8
passwordTests
passwordTestThreshold = 3
tooShortMessage
tooWeakMessage
isInvalid(self, value)
fromClient(self, skel: SkeletonInstance, name: str, data: dict)Union[None, List[ReadFromClientError]]
serialize(self, skel: SkeletonInstance, name: str, parentIndexed: bool)bool
unserialize(self, skeletonValues, name)