-
-
-class PBKDF2Salt(Choice):
- schema = (
- ("specified", OctetString()),
- # ("otherSource", PBKDF2SaltSources()),
- )
-
-
-id_hmacWithSHA1 = ObjectIdentifier("1.2.840.113549.2.7")
-
-
-class PBKDF2PRFs(AlgorithmIdentifier):
- schema = (
- ("algorithm", ObjectIdentifier(default=id_hmacWithSHA1)),
- ("parameters", Any(optional=True)),
- )
-
-
-class IterationCount(Integer):
- bounds = (1, float("+inf"))
-
-
-class KeyLength(Integer):
- bounds = (1, float("+inf"))
-
-
-class PBKDF2Params(Sequence):
- schema = (
- ("salt", PBKDF2Salt()),
- ("iterationCount", IterationCount(optional=True)),
- ("keyLength", KeyLength(optional=True)),
- ("prf", PBKDF2PRFs()),
- )