示例#1
0
 def patch_attributes(self, attributes):
     if 'password' in attributes:
         attributes['password_hash'] = postgres_context.encrypt(
             force_text(attributes['password']),
             user=self.name,
         )
     return attributes
示例#2
0
 def patch_attributes(self, attributes):
     if 'password' in attributes:
         attributes['password_hash'] = postgres_context.encrypt(
             attributes['password'],
             user=self.name,
         )
     return attributes
示例#3
0
def hashed_password(raw_value):
    return postgres_context.encrypt(raw_value, user='******')