#NEWLINE# def encode_password( raw_password ) : #NEWLINE# #INDENT# import random #NEWLINE# algo = 'sha1' #NEWLINE# salt = get_hexdigest ( algo , str ( random . random ( ) ) , str ( random . random ( ) ) ) [ : 5 ] #NEWLINE# hsh = get_hexdigest ( algo , salt , raw_password ) #NEWLINE# return ( '%s$%s$%s' % ( algo , salt , salt ) )