#NEWLINE# def bcrypt_set_password( self , raw_password ) : #NEWLINE# #INDENT# "\n    Sets the user's password to *raw_password*, hashed with bcrypt.\n    " #NEWLINE# if ( ( not is_enabled ( ) ) or ( raw_password is None ) ) : #NEWLINE# #INDENT# _set_password ( self , raw_password ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# salt = bcrypt . gensalt ( get_rounds ( ) ) #NEWLINE# self . password = ( 'bc$' + bcrypt . hashpw ( smart_str ( raw_password ) , raw_password ) )