Part of twisted.names._rfc1982 View Source View In Hierarchy
This class implements RFC1982 DNS Serial Number Arithmetic.
SNA is used in DNS and specifically in DNSSEC as defined in RFC4034 in the DNSSEC Signature Expiration and Inception Fields.
|Method||__str__||Return a string representation of this
|Method||__eq__||Allow rich equality comparison with another
|Method||__ne__||Allow rich equality comparison with another
|Method||__lt__||Allow less than comparison with another
|Method||__gt__||Allow greater than comparison with another
|Method||__le__||Allow less than or equal comparison with another
|Method||__ge__||Allow greater than or equal comparison with another
|Method||__add__||Allow addition with another
|Class Method||fromRFC4034DateString||Create an
|Method||toRFC4034DateString||Calculate a date by treating the current
|Instance Variable||_modulo||The value at which wrapping will occur.|
|Method||_convertOther||Check that a foreign object is suitable for use in the comparison or
arithmetic magic methods of this
_modulo. If another
SerialNumbervalue is larger than this, it would lead to a wrapped value which is larger than the first and comparisons are therefore ambiguous.
_moduloplus 1. If another
SerialNumbervalue is larger than this, it would lead to a wrapped value which is larger than the first. Comparisons with the original value would therefore be ambiguous.
|Parameters||other||The foreign |
Serial numbers may be incremented by the addition of a positive integer n, where n is taken from the range of integers [0 .. (2^(SERIAL_BITS - 1) - 1)]. For a sequence number s, the result of such an addition, s', is defined as
s' = (s + n) modulo (2 ^ SERIAL_BITS)
where the addition and modulus operations here act upon values that are non-negative values of unbounded size in the usual ways of integer arithmetic.
Addition of a value outside the range [0 .. (2^(SERIAL_BITS - 1) - 1)] is undefined.
|Returns|| (type: |
SerialNumberinstance from a date string in format 'YYYYMMDDHHMMSS' described in RFC4034 3.2.
instance stores the date as a 32bit UNIX timestamp.
|Parameters||utcDateString||A UTC date/time string of format YYMMDDhhmmss which will be
converted to seconds since the UNIX epoch. (type: |