Package posterity :: Package util

Package util



Submodules

Classes
  Config
ConfigParser but with a sane api
  FixedOffset
Fixed offset in minutes east from UTC.
  LocalTimezone
A 'local' time zone implementation
Functions
 
encrypt_password(password)
Return a SHA1/base64 encrypted version of the password
 
hex_entropy(bytes=32)
Returns a bytes characters long string containing random data
Variables
  STDOFFSET = datetime.timedelta(0, 3600)
  DSTOFFSET = datetime.timedelta(0, 3600)
  DSTDIFF = datetime.timedelta(0, 3600)
  utc = <FixedOffset "UTC" 0:00:00>
  utcmin = datetime.datetime(1, 1, 1, 0, 0, tzinfo=<FixedOffset ...
  utcmax = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999, t...
  localtz = LocalTimezone()
Function Details

encrypt_password(password)

 

Return a SHA1/base64 encrypted version of the password

The output is compatible with the apache htpasswd utility.


Variables Details

utcmin

Value:
datetime.datetime(1, 1, 1, 0, 0, tzinfo=<FixedOffset "UTC" 0:00:00>)

utcmax

Value:
datetime.datetime(9999, 12, 31, 23, 59, 59, 999999, tzinfo=<FixedOffse\
t "UTC" 0:00:00>)