You need to add a value range constraint to Integer object like this:
from pyasn1.type import univ, namedtype, constraint
class Pbkdf2params(univ.Sequence):
componentType = namedtype.NamedTypes(
namedtype.NamedType('salt', univ.OctetString()),
namedtype.NamedType('iterationCount', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(1,MAX)),
namedtype.NamedType('keyLength', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, MAX))
)
Whenever you attempt to initialize Integer with an out-of-range value, an exception will be thrown.