def parsePasswordHash(password):
 blank = (' ' * 8)
 if ((not password) or (password == ' ')):
  password = NULL
 if (Backend.isDbms(DBMS.MSSQL) and (password != NULL) and isHexEncodedString(password)):
  hexPassword = password
  password = ('%s\n' % hexPassword)
  password += ('%sheader: %s\n' % (blank, hexPassword[:6]))
  password += ('%ssalt: %s\n' % (blank, hexPassword[6:14]))
  password += ('%smixedcase: %s\n' % (blank, hexPassword[14:54]))
  if (not Backend.isVersionWithin(('2005', '2008'))):
   password += ('%suppercase: %s' % (blank, hexPassword[54:]))
 return password

def parsePasswordHash ( password ) : blank = ( ' ' * 8 ) if ( ( not password ) or ( password == ' ' ) ) : password = NULL if ( Backend . isDbms ( DBMS . MSSQL ) and ( password != NULL ) and isHexEncodedString ( password ) ) : hexPassword = password password = ( '%s\n' % hexPassword ) password += ( '%sheader: %s\n' % ( blank , hexPassword [ : 6 ] ) ) password += ( '%ssalt: %s\n' % ( blank , hexPassword [ 6 : 14 ] ) ) password += ( '%smixedcase: %s\n' % ( blank , hexPassword [ 14 : 54 ] ) ) if ( not Backend . isVersionWithin ( ( '2005' , '2008' ) ) ) : password += ( '%suppercase: %s' % ( blank , hexPassword [ 54 : ] ) ) return password
in case of microsoft sql server password hash value is expanded to its components .