def _parse_content(content):
 password = content
 salt = None
 salt_slug = u' salt='
 try:
  sep = content.rindex(salt_slug)
 except ValueError:
  pass
 else:
  salt = password[(sep + len(salt_slug)):]
  password = content[:sep]
 return (password, salt)

def _parse_content ( content ) : password = content salt = None salt_slug = u' salt=' try : sep = content . rindex ( salt_slug ) except ValueError : pass else : salt = password [ ( sep + len ( salt_slug ) ) : ] password = content [ : sep ] return ( password , salt )
parse our password data format into password and salt :arg content: the data read from the file :returns: password and salt .