Package pyxmpp2 :: Module xmppstringprep
[hide private]

Module xmppstringprep

Nodeprep and resourceprep stringprep profiles.

Normative reference:
Classes [hide private]
  Profile
Base class for stringprep profiles.
Functions [hide private]
 
b1_mapping(char)
Do RFC 3454 B.1 table mapping.
 
nfkc(data)
Do NFKC normalization of Unicode data.
 
set_stringprep_cache_size(size)
Modify stringprep cache size.
Variables [hide private]
  NODEPREP_PROHIBITED = set([u'"', u'&', u''', u'/', u':', u'<',...
  NODEPREP = Profile(unassigned= (stringprep.in_table_a1,), mapp...
  RESOURCEPREP = Profile(unassigned= (stringprep.in_table_a1,), ...
  _stringprep_cache_size = 1000
Function Details [hide private]

b1_mapping(char)

 
Do RFC 3454 B.1 table mapping.
Parameters:
  • char - Unicode character to map.
Returns:
u"" if there is char code in the table, None otherwise.

nfkc(data)

 
Do NFKC normalization of Unicode data.
Parameters:
  • data - list of Unicode characters or Unicode string.
Returns:
normalized Unicode string.

set_stringprep_cache_size(size)

 
Modify stringprep cache size.
Parameters:
  • size - new cache size

Variables Details [hide private]

NODEPREP_PROHIBITED

Value:
set([u'"', u'&', u''', u'/', u':', u'<', u'>', u'@'])

NODEPREP

Value:
Profile(unassigned= (stringprep.in_table_a1,), mapping= (b1_mapping, s\
tringprep.map_table_b2), normalization= nfkc, prohibited= (stringprep.\
in_table_c11, stringprep.in_table_c12, stringprep.in_table_c21, string\
prep.in_table_c22, stringprep.in_table_c3, stringprep.in_table_c4, str\
ingprep.in_table_c5, stringprep.in_table_c6, stringprep.in_table_c7, s\
tringprep.in_table_c8, stringprep.in_table_c9, lambda x: x in NODEPREP\
_PROHIBITED), bidi= True)

RESOURCEPREP

Value:
Profile(unassigned= (stringprep.in_table_a1,), mapping= (b1_mapping,),\
 normalization= nfkc, prohibited= (stringprep.in_table_c12, stringprep\
.in_table_c21, stringprep.in_table_c22, stringprep.in_table_c3, string\
prep.in_table_c4, stringprep.in_table_c5, stringprep.in_table_c6, stri\
ngprep.in_table_c7, stringprep.in_table_c8, stringprep.in_table_c9), b\
idi= True)