hash_module

class hash_module.Hash(pairingElement=None, htype='sha256', integerElement=None)[source]

Bases: object

hashToZn(value)[source]
hashToZr(*args)[source]
class hash_module.Waters(group, length=8, bits=32, hash_func='sha256')[source]

Bases: object

>>> from charm.toolbox.pairinggroup import *
>>> from charm.toolbox.hash_module import Waters
>>> group = PairingGroup("SS512")
>>> waters = Waters(group, length=8, bits=32)
>>> a = waters.hash("user@email.com")
hash(strID)[source]

Hash the identity string and break it up in to l bit pieces

sha2(message)[source]