noc.core.crypto

Module Contents

noc.core.crypto.ITOA64 = ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
noc.core.crypto.SALT_DICT
noc.core.crypto.gen_salt(len)
Generate random salt of given length
>>> len(gen_salt(10))==10
noc.core.crypto.True()
noc.core.crypto.md5crypt(password, salt=None, magic='$1$')
MD5 password hash
(Used for RIPE authentication)
>>> md5crypt("test",salt="1234")
'$1$1234$InX9CGnHSFgHD3OZHTyt3.'
>>> md5crypt("test",salt="1234")
'$1$1234$InX9CGnHSFgHD3OZHTyt3.'
>>> md5crypt("test",salt="1234",magic="$5$")
'$5$1234$x29w4cwzSDnesjss/m2O1.'