utils – headstock utils

Module author: Sylvain Hellegouarch <sh@defuze.org>

headstock.lib.utils.generate_unique(seed=None)

Generates a random and pseudo-unique string.

seed None - if None the seed is generated from the current time and a random value.

headstock.lib.utils.remove_BOM(text)
Removes the BOM from the provided text.
headstock.lib.utils.compute_handshake(stanza_id, secret)

Computes the SASL handshake

stanza_id stanza identifier

secret the secret value to be hashed with the stanza identifier.

headstock.lib.utils.parse_commandline()
Helper to parse the command line. Useful for quick client mockup.

Previous topic

logger – Logger class handler

This Page