core.bones.password
¶
Module Contents¶
Classes¶
A bone holding passwords. |
Functions¶
|
Decodes a pashword and return the hash and meta information as hash |
Attributes¶
- core.bones.password.PBKDF2_DEFAULT_ITERATIONS = 600000¶
- core.bones.password.encode_password(password: str | bytes, salt: str | bytes, iterations: int = PBKDF2_DEFAULT_ITERATIONS, dklen: int = 42) dict[str, str | bytes] ¶
Decodes a pashword and return the hash and meta information as hash
- class core.bones.password.PasswordBone(*, test_threshold: int = 3, tests: List[Tuple] = tests, **kwargs)¶
Bases:
viur.core.bones.string.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¶
- tests: tuple[tuple[str, str, bool]] = (('^.*[A-Z].*$',), ('^.*[a-z].*$',), ('^.*\\d.*$',), ('^.*\\W.*$',), ('^.{8,}$',))¶
- isInvalid(value)¶
- fromClient(skel: SkeletonInstance, name: str, data: dict) None | List[core.bones.base.ReadFromClientError] ¶
- serialize(skel: SkeletonInstance, name: str, parentIndexed: bool) bool ¶
- unserialize(skeletonValues, name)¶
- structure() dict ¶